@@ -33,28 +33,25 @@ Keyboard.styleDark = function(dark) {
33
33
Keyboard . isVisible = false ;
34
34
35
35
channel . 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
+ }
58
55
} ) ;
59
56
60
57
module . exports = Keyboard ;
0 commit comments