Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit 2d8f4cb

Browse files
committed
be more generic
1 parent fa66f00 commit 2d8f4cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ios/IonicKeyboard.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ - (void)pluginInitialize
2323
CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
2424
keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil];
2525

26-
[weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"Keyboard.isVisible = true; cordova.fireWindowEvent('ionic.showkeyboard', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]];
26+
[weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.plugins.Keyboard.isVisible = true; cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]];
2727

2828
}];
2929

3030
_keyboardHideObserver = [nc addObserverForName:UIKeyboardWillHideNotification
3131
object:nil
3232
queue:[NSOperationQueue mainQueue]
3333
usingBlock:^(NSNotification* notification) {
34-
[weakSelf.commandDelegate evalJs:@"Keyboard.isVisible = false; cordova.fireWindowEvent('ionic.hidekeyboard'); "];
34+
[weakSelf.commandDelegate evalJs:@"cordova.plugins.Keyboard.isVisible = false; cordova.fireWindowEvent('native.hidekeyboard'); "];
3535
}];
3636
}
3737

0 commit comments

Comments
 (0)