From dadfdb06471fd3882b25ed5f9998d160fe07d909 Mon Sep 17 00:00:00 2001 From: nkmrh Date: Tue, 7 Oct 2025 14:48:48 +0900 Subject: [PATCH] Should fix issue https://github.com/quipper/aya-issues/issues/94298 --- Sources/Controllers/MessagesViewController+Keyboard.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/Controllers/MessagesViewController+Keyboard.swift b/Sources/Controllers/MessagesViewController+Keyboard.swift index 4196e8d83..6bedf7e65 100644 --- a/Sources/Controllers/MessagesViewController+Keyboard.swift +++ b/Sources/Controllers/MessagesViewController+Keyboard.swift @@ -90,6 +90,12 @@ internal extension MessagesViewController { // view. guard let keyboardEndFrameInScreenCoords = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else { return } + + // On iOS 26 and later, keyboard notifications may be sent with an empty frame when the keyboard is dismissed. + if #available(iOS 26, *), keyboardEndFrameInScreenCoords.isEmpty { + return + } + let keyboardEndFrame = view.convert(keyboardEndFrameInScreenCoords, from: view.window) let newBottomInset = requiredScrollViewBottomInset(forKeyboardFrame: keyboardEndFrame)