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

Fix issue #173 #212

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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: 0 additions & 5 deletions src/ios/IonicKeyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,13 @@ - (void)pluginInitialize {

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

//deprecated
[weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]];
}];

_keyboardHideObserver = [nc addObserverForName:UIKeyboardWillHideNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification* notification) {
[weakSelf.commandDelegate evalJs:@"cordova.plugins.Keyboard.isVisible = false; cordova.fireWindowEvent('native.keyboardhide'); "];

//deprecated
[weakSelf.commandDelegate evalJs:@"cordova.fireWindowEvent('native.hidekeyboard'); "];
}];
}

Expand Down
6 changes: 0 additions & 6 deletions www/android/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,9 @@ channel.onCordovaReady.subscribe(function() {
var keyboardHeight = msg.substr(1);
cordova.plugins.Keyboard.isVisible = true;
cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': + keyboardHeight });

//deprecated
cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': + keyboardHeight });
} else if ( action === 'H' ) {
cordova.plugins.Keyboard.isVisible = false;
cordova.fireWindowEvent('native.keyboardhide');

//deprecated
cordova.fireWindowEvent('native.hidekeyboard');
}
}
});
Expand Down