Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Controllers/MessagesViewController+Keyboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS 26 の場合のみ、keyboardEndFrameInScreenCoords が 0 の通知が飛んできており、それによって Inset が0となってしまいレイアウトが崩れていました。
0の通知を無視することで正しい通知のみが適用されて、レイアウトが崩れなくなります。

return
}

let keyboardEndFrame = view.convert(keyboardEndFrameInScreenCoords, from: view.window)

let newBottomInset = requiredScrollViewBottomInset(forKeyboardFrame: keyboardEndFrame)
Expand Down
Loading