mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-21 03:40:12 +02:00
Don't raise keyboard for non-text HTML input fields
This commit is contained in:
parent
196473f9fa
commit
e79f6b1203
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