Skip to content

Commit

Permalink
support old keyboard events
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpearson committed Jul 6, 2015
1 parent 7df4642 commit 6d57af6
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions www/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ Keyboard.disableScrollingInShrinkView = function(disable) {
Keyboard.fireOnShow = function() {
Keyboard.isVisible = true;
cordova.fireWindowEvent('keyboardDidShow');

if(Keyboard.onshow) {
Keyboard.onshow();
}
};

Keyboard.fireOnHide = function() {
Keyboard.isVisible = false;
cordova.fireWindowEvent('keyboardDidHide');

if(Keyboard.onhide) {
Keyboard.onhide();
}
};

Keyboard.fireOnHiding = function() {
// Automatic scroll to the top of the page
// to prevent quirks when using position:fixed elements
Expand All @@ -56,12 +66,18 @@ Keyboard.fireOnHiding = function() {
}

cordova.fireWindowEvent('keyboardWillHide');

if(Keyboard.onhiding) {
Keyboard.onhiding();
}
};

Keyboard.fireOnShowing = function() {
cordova.fireWindowEvent('keyboardWillShow');
};
Keyboard.fireOnHeightChange = function() {


if(Keyboard.onshowing) {
Keyboard.onshowing();
}
};

Keyboard.show = function() {
Expand Down

0 comments on commit 6d57af6

Please sign in to comment.