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:
Pierre Ossman 2017-02-09 14:20:37 +01:00
parent 0ae5b50a0e
commit b345859ed6
1 changed files with 15 additions and 9 deletions

View File

@ -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
return; if (event.target.form !== undefined) {
} switch (event.target.type) {
case 'text':
// And form elements, except standard noVNC buttons case 'email':
if ((event.target.form !== undefined) && case 'search':
!event.target.classList.contains("noVNC_button")) { case 'password':
return; case 'tel':
case 'url':
case 'textarea':
case 'select-one':
case 'select-multiple':
return;
}
} }
event.preventDefault(); event.preventDefault();