@@ -33,28 +33,25 @@ Keyboard.styleDark = function(dark) {
3333Keyboard . isVisible = false ;
3434
3535channel . onCordovaReady . subscribe ( function ( ) {
36- exec ( success , null , 'Keyboard' , 'init' , [ ] ) ;
37-
38- function success ( msg ) {
39- var action = msg . charAt ( 0 ) ;
40- if ( action === 'S' ) {
41- var keyboardHeight = msg . substr ( 1 ) ;
42- cordova . plugins . Keyboard . isVisible = true ;
43- cordova . fireWindowEvent ( 'native.keyboardshow' , { 'keyboardHeight' : + keyboardHeight } ) ;
44-
45- //deprecated
46- cordova . fireWindowEvent ( 'native.showkeyboard' , { 'keyboardHeight' : + keyboardHeight } ) ;
47- }
48-
49- if ( action === 'H' ) {
50- cordova . plugins . Keyboard . isVisible = false ;
51- cordova . fireWindowEvent ( 'native.keyboardhide' ) ;
52-
53- //deprecated
54- cordova . fireWindowEvent ( 'native.hidekeyboard' ) ;
55- }
56-
57- }
36+ exec ( success , null , 'Keyboard' , 'init' , [ ] ) ;
37+
38+ function success ( msg ) {
39+ var action = msg . charAt ( 0 ) ;
40+ if ( action === 'S' ) {
41+ var keyboardHeight = msg . substr ( 1 ) ;
42+ cordova . plugins . Keyboard . isVisible = true ;
43+ cordova . fireWindowEvent ( 'native.keyboardshow' , { 'keyboardHeight' : + keyboardHeight } ) ;
44+
45+ //deprecated
46+ cordova . fireWindowEvent ( 'native.showkeyboard' , { 'keyboardHeight' : + keyboardHeight } ) ;
47+ } else if ( action === 'H' ) {
48+ cordova . plugins . Keyboard . isVisible = false ;
49+ cordova . fireWindowEvent ( 'native.keyboardhide' ) ;
50+
51+ //deprecated
52+ cordova . fireWindowEvent ( 'native.hidekeyboard' ) ;
53+ }
54+ }
5855} ) ;
5956
6057module . exports = Keyboard ;
0 commit comments