mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 00:26:33 +02:00
Don't raise keyboard for non-text HTML input fields
This commit is contained in:
parent
de5e02310b
commit
0c47960553
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue