Skip to content
Open
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
5 changes: 5 additions & 0 deletions ios/Sources/KeyboardPlugin/Keyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ - (void)onKeyboardWillHide:(NSNotification *)notification

- (void)onKeyboardWillShow:(NSNotification *)notification
{
// Macs have no virtual keyboard, but UIKit still posts these notifications with a bogus frame
if (NSProcessInfo.processInfo.isiOSAppOnMac) return;

if (hideTimer != nil) {
[hideTimer invalidate];
}
Expand Down Expand Up @@ -266,6 +269,8 @@ - (void)onKeyboardWillShow:(NSNotification *)notification

- (void)onKeyboardDidShow:(NSNotification *)notification
{
if (NSProcessInfo.processInfo.isiOSAppOnMac) return;

CGRect rect = [[notification.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
double height = rect.size.height;

Expand Down