Skip to content

Commit

Permalink
fix(ios): update frame immediately when keyboard hides (#3038)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbannigan committed Jun 3, 2020
1 parent a8ad95d commit e538bad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/Capacitor/Capacitor/Plugins/Keyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ - (void)onKeyboardWillHide:(NSNotification *)notification
[self.bridge triggerWindowJSEventWithEventName:@"keyboardWillHide"];
[self notifyListeners:@"keyboardWillHide" data:nil];
}];
[[NSRunLoop currentRunLoop] addTimer:hideTimer forMode:NSRunLoopCommonModes];
}

- (void)onKeyboardWillShow:(NSNotification *)notification
Expand Down Expand Up @@ -171,7 +172,7 @@ - (void)setKeyboardHeight:(int)height delay:(NSTimeInterval)delay
if (delay == 0) {
[self _updateFrame];
} else {
[weakSelf performSelector:action withObject:nil afterDelay:delay];
[weakSelf performSelector:action withObject:nil afterDelay:delay inModes:@[NSRunLoopCommonModes]];
}
}

Expand Down

0 comments on commit e538bad

Please sign in to comment.