Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit c713ffd

Browse files
committed
[[ Bug 22256 ]] Use correct user info key to obtain keyboard size
This patch changes our use of `UIKeyboardFrameBeginUserInfoKey` which is the keyboard frame prior to animating into place to `UIKeyboardFrameEndUserInfoKey` which is the final keyboard frame. This resolves a bug where the height of the keyboard changes during the animation.
1 parent adf7d78 commit c713ffd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/notes/bugfix-22256.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix mobileSetKeyboardDisplay panning incorrect amount on second and subsequent keyboard activation

engine/src/mbliphoneapp.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,8 @@ - (void)keyboardWillActivate:(NSNotification *)notification
822822
t_info = [notification userInfo];
823823

824824
CGSize t_size;
825-
t_size = [[t_info objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
826-
825+
t_size = [[t_info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
826+
827827
// MM-2012-02-26: [[ Bug 10677 ]] Keyboard dimensions do not take into account orientation.
828828
// We want height here, so assume the keyboard is always wider than it is taller and take the min of the two.
829829
CGFloat t_height = MCMin(t_size . height, t_size . width);

0 commit comments

Comments
 (0)