Raise and lower keyboard on password fields

This commit is contained in:
David Rowe 2016-12-13 22:48:17 +13:00
parent c9a00e86d1
commit 20623ebddb
2 changed files with 2 additions and 2 deletions
interface/resources/html
scripts/system/html/js

View file

@ -19,7 +19,7 @@
function shouldRaiseKeyboard() {
var nodeName = document.activeElement.nodeName;
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") {
return true;
} else {

View file

@ -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++) {
inputs[i].addEventListener("focus", raiseKeyboard);
inputs[i].addEventListener("blur", lowerKeyboard);