Skip to content
Merged
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
11 changes: 9 additions & 2 deletions ios/observers/FocusedInputObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,16 @@ public class FocusedInputObserver: NSObject {
NotificationCenter.default.removeObserver(self)
}

@objc func didReceiveFocus(_: Notification) {
@objc func didReceiveFocus(_ notification: Notification) {
if UIResponder.current == currentResponder {
// focus was already handled by keyboard event
// The same input is still focused — no need to re-run the full onFocus()
// setup (observers, delegate substitution, focusDidSet event). However,
// keyboardWillShowNotification also fires when the keyboard *resizes*
// (e.g. switching between text and emoji keyboards). In that case we must
// refresh the layout so consumers receive an up-to-date absoluteY.
if notification.name == UIResponder.keyboardWillShowNotification {
syncUpLayout()
}
return
}

Expand Down
Loading