ionic-plugin-keyboard
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "ionic-plugin-keyboard", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"cordova": { | ||
@@ -5,0 +5,0 @@ "id": "ionic-plugin-keyboard", |
@@ -6,3 +6,3 @@ Keyboard | ||
cordova plugin add com.ionic.keyboard | ||
cordova plugin add ionic-plugin-keyboard | ||
@@ -9,0 +9,0 @@ Methods |
var argscheck = require('cordova/argscheck'), | ||
utils = require('cordova/utils'), | ||
exec = require('cordova/exec'); | ||
exec = require('cordova/exec'), | ||
channel = require('cordova/channel'); | ||
@@ -34,2 +35,24 @@ | ||
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 }); | ||
} else if ( action === 'H' ) { | ||
cordova.plugins.Keyboard.isVisible = false; | ||
cordova.fireWindowEvent('native.keyboardhide'); | ||
//deprecated | ||
cordova.fireWindowEvent('native.hidekeyboard'); | ||
} | ||
} | ||
}); | ||
module.exports = Keyboard; | ||
@@ -36,0 +59,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5045901
265
21