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
24
app/ui.js
24
app/ui.js
|
@ -1479,15 +1479,21 @@ var UI;
|
|||
return;
|
||||
}
|
||||
|
||||
// Allow clicking on links
|
||||
if (event.target.tagName === "A") {
|
||||
return;
|
||||
}
|
||||
|
||||
// And form elements, except standard noVNC buttons
|
||||
if ((event.target.form !== undefined) &&
|
||||
!event.target.classList.contains("noVNC_button")) {
|
||||
return;
|
||||
// Only allow focus to move to other elements that need
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Reference in New Issue