Skip to content

Commit

Permalink
Don't offset the view if there's no text input rect
Browse files Browse the repository at this point in the history
Otherwise this will shift the entire view upwards, which probably isn't what you want.
  • Loading branch information
slouken committed Oct 29, 2024
1 parent c8a04ee commit 5162803
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/uikit/SDL_uikitviewcontroller.m
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ - (void)updateKeyboard
CGRect frame = UIKit_ComputeViewFrame(window, data.uiwindow.screen);
#endif

if (self.keyboardHeight) {
if (self.keyboardHeight && self.textInputRect.h) {
int rectbottom = (int)(self.textInputRect.y + self.textInputRect.h);
int keybottom = (int)(self.view.bounds.size.height - self.keyboardHeight);
if (keybottom < rectbottom) {
Expand Down

0 comments on commit 5162803

Please # to comment.