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
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,14 @@ class KeyboardTracker {
if self.keyboardTrackerView.preferredSize.height != inputContainerHeight {
self.keyboardTrackerView.preferredSize.height = inputContainerHeight
self.isPerformingForcedLayout = true

// Sometimes, the autolayout system doesn't finish the layout inside of the input bar container at this point.
// If it happens, then the input bar may have a height different than an input bar container.
// We need to ensure that their heights are the same; otherwise, it would lead to incorrect calculations that in turn affects lastKnownKeyboardHeight.
// Tracking view adjustment changes a keyboard height and triggers an update of lastKnownKeyboardHeight.
self.inputBarContainer.layoutIfNeeded()
self.keyboardTrackerView.window?.layoutIfNeeded()

self.isPerformingForcedLayout = false
}
}
Expand Down