mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
Raise and lower keyboard on password fields
This commit is contained in:
parent
c9a00e86d1
commit
20623ebddb
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
||||||
function shouldRaiseKeyboard() {
|
function shouldRaiseKeyboard() {
|
||||||
var nodeName = document.activeElement.nodeName;
|
var nodeName = document.activeElement.nodeName;
|
||||||
var nodeType = document.activeElement.type;
|
var nodeType = document.activeElement.type;
|
||||||
if (nodeName === "INPUT" && (nodeType === "text" || nodeType === "number")
|
if (nodeName === "INPUT" && (nodeType === "text" || nodeType === "number" || nodeType === "password")
|
||||||
|| document.activeElement.nodeName === "TEXTAREA") {
|
|| document.activeElement.nodeName === "TEXTAREA") {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -56,7 +56,7 @@ function setUpKeyboardControl() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var inputs = document.querySelectorAll("input[type=text], input[type=number], textarea");
|
var inputs = document.querySelectorAll("input[type=text], input[type=password], input[type=number], textarea");
|
||||||
for (var i = 0, length = inputs.length; i < length; i++) {
|
for (var i = 0, length = inputs.length; i < length; i++) {
|
||||||
inputs[i].addEventListener("focus", raiseKeyboard);
|
inputs[i].addEventListener("focus", raiseKeyboard);
|
||||||
inputs[i].addEventListener("blur", lowerKeyboard);
|
inputs[i].addEventListener("blur", lowerKeyboard);
|
||||||
|
|
Loading…
Reference in a new issue