More aggressive retaining of focus
Try to keep the virtual keyboard up even more. Only release focus when it is absolutely necessary.
This commit is contained in:
parent
0ae5b50a0e
commit
b345859ed6
20
app/ui.js
20
app/ui.js
|
@ -1479,15 +1479,21 @@ var UI;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow clicking on links
|
// Only allow focus to move to other elements that need
|
||||||
if (event.target.tagName === "A") {
|
// focus to function properly
|
||||||
|
if (event.target.form !== undefined) {
|
||||||
|
switch (event.target.type) {
|
||||||
|
case 'text':
|
||||||
|
case 'email':
|
||||||
|
case 'search':
|
||||||
|
case 'password':
|
||||||
|
case 'tel':
|
||||||
|
case 'url':
|
||||||
|
case 'textarea':
|
||||||
|
case 'select-one':
|
||||||
|
case 'select-multiple':
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// And form elements, except standard noVNC buttons
|
|
||||||
if ((event.target.form !== undefined) &&
|
|
||||||
!event.target.classList.contains("noVNC_button")) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue