Don't raise keyboard for non-text HTML input fields

This commit is contained in:
David Rowe 2016-11-03 09:01:28 +13:00
parent de5e02310b
commit 0c47960553

View file

@ -17,7 +17,10 @@
var KEYBOARD_HEIGHT = 200;
function shouldRaiseKeyboard() {
if (document.activeElement.nodeName === "INPUT" || document.activeElement.nodeName === "TEXTAREA") {
var nodeName = document.activeElement.nodeName;
var nodeType = document.activeElement.type;
if (nodeName === "INPUT" && (nodeType === "text" || nodeType === "number")
|| document.activeElement.nodeName === "TEXTAREA") {
return true;
} else {
// check for contenteditable attribute