mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Fix keyboard status when switching between entities editor tabs
This commit is contained in:
parent
a0dd3d8771
commit
ad5d525340
1 changed files with 11 additions and 0 deletions
|
@ -47,10 +47,21 @@ function setUpKeyboardControl() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function documentBlur() {
|
||||||
|
// Action any pending Lower keyboard event immediately upon leaving document window so that they don't interfere with
|
||||||
|
// other Entities Editor tab.
|
||||||
|
if (lowerTimer !== null) {
|
||||||
|
clearTimeout(lowerTimer);
|
||||||
|
doLowerKeyboard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var inputs = document.querySelectorAll("input[type=text], input[type=number], textarea");
|
var inputs = document.querySelectorAll("input[type=text], 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.addEventListener("blur", documentBlur);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue