mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-03 23:44:06 +02: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");
|
||||
for (var i = 0, length = inputs.length; i < length; i++) {
|
||||
inputs[i].addEventListener("focus", raiseKeyboard);
|
||||
inputs[i].addEventListener("blur", lowerKeyboard);
|
||||
}
|
||||
|
||||
window.addEventListener("blur", documentBlur);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue