I have the next test code:
html:
<html>
<head>
<script src="js/app.js"></script>
<script src="cordova.js"></script>
</head>
<body>
<p><button>Show keyboard</button></p>
<p><input></input></p>
<p><span>?</span></p>
</body>
</html>
and js:
document.addEventListener("deviceready", handler, false);
function handler() {
window.addEventListener('native.keyboardshow', function() {
document.getElementsByTagName("span")[0].innerHTML = "showed";
});
document.getElementsByTagName("button")[0].addEventListener("click", function() {
document.getElementsByTagName("input")[0].focus();
cordova.plugins.Keyboard.show();
});
}
The show()
function works, and I understand that the plugin is available from my app. But when the keyboard is showed nothing occurs: my span
tag doesn't get the "showed"
text.
What is an issue?