Remove focus from UI elements

This commit is contained in:
Ajaykumar Mittakola 2025-04-16 14:55:46 +05:30
parent 57c8662718
commit e1899c3ab2
1 changed files with 8 additions and 8 deletions

View File

@ -559,7 +559,7 @@ const UI = {
UI.closeAllPanels(); UI.closeAllPanels();
document.getElementById('noVNC_control_bar') document.getElementById('noVNC_control_bar')
.classList.remove("noVNC_open"); .classList.remove("noVNC_open");
UI.rfb.focus(); //UI.rfb.focus();
}, },
toggleControlbar() { toggleControlbar() {
@ -1150,7 +1150,7 @@ const UI = {
UI.updateVisualState('connected'); UI.updateVisualState('connected');
// Do this last because it can only be used on rendered elements // Do this last because it can only be used on rendered elements
UI.rfb.focus(); //UI.rfb.focus();
}, },
disconnectFinished(e) { disconnectFinished(e) {
@ -1262,8 +1262,8 @@ const UI = {
document.getElementById('noVNC_credentials_dlg') document.getElementById('noVNC_credentials_dlg')
.classList.add('noVNC_open'); .classList.add('noVNC_open');
setTimeout(() => document // setTimeout(() => document
.getElementById(inputFocus).focus(), 100); // .getElementById(inputFocus).focus(), 100);
Log.Warn("Server asked for credentials"); Log.Warn("Server asked for credentials");
UI.showStatus(_("Credentials are required"), "warning"); UI.showStatus(_("Credentials are required"), "warning");
@ -1470,7 +1470,7 @@ const UI = {
if (document.activeElement == input) return; if (document.activeElement == input) return;
input.focus(); //input.focus();
try { try {
const l = input.value.length; const l = input.value.length;
@ -1697,7 +1697,7 @@ const UI = {
sendCtrlAltDel() { sendCtrlAltDel() {
UI.rfb.sendCtrlAltDel(); UI.rfb.sendCtrlAltDel();
// See below // See below
UI.rfb.focus(); //UI.rfb.focus();
UI.idleControlbar(); UI.idleControlbar();
}, },
@ -1712,9 +1712,9 @@ const UI = {
// element instead. // element instead.
if (document.getElementById('noVNC_keyboard_button') if (document.getElementById('noVNC_keyboard_button')
.classList.contains("noVNC_selected")) { .classList.contains("noVNC_selected")) {
document.getElementById('noVNC_keyboardinput').focus(); //document.getElementById('noVNC_keyboardinput').focus();
} else { } else {
UI.rfb.focus(); //UI.rfb.focus();
} }
// fade out the controlbar to highlight that // fade out the controlbar to highlight that
// the focus has been moved to the screen // the focus has been moved to the screen