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

Commit

Permalink
fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Sep 14, 2015
1 parent f710324 commit b2bc20b
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions www/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,25 @@ Keyboard.styleDark = function(dark) {
Keyboard.isVisible = false;

channel.onCordovaReady.subscribe(function() {
exec(success, null, 'Keyboard', 'init', []);

function success(msg) {
var action = msg.charAt(0);
if ( action === 'S' ) {
var keyboardHeight = msg.substr(1);
cordova.plugins.Keyboard.isVisible = true;
cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': + keyboardHeight });

//deprecated
cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': + keyboardHeight });
}

if ( action === 'H' ) {
cordova.plugins.Keyboard.isVisible = false;
cordova.fireWindowEvent('native.keyboardhide');

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

}
exec(success, null, 'Keyboard', 'init', []);

function success(msg) {
var action = msg.charAt(0);
if ( action === 'S' ) {
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');
}
}
});

module.exports = Keyboard;
Expand Down

0 comments on commit b2bc20b

Please sign in to comment.