]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Don't fade the control bar if it has focus
authorSamuel Mannehed <samuel@cendio.se>
Fri, 1 May 2020 12:38:09 +0000 (14:38 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Fri, 1 May 2020 12:38:09 +0000 (14:38 +0200)
Fixes github issue #1369

app/ui.js

index 1c6248ed87c84e806909fafc5e334e15bc754ad9..8be8afb7a241b6546403fc344707737fa055138d 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -518,6 +518,13 @@ const UI = {
     },
 
     idleControlbar() {
+        // Don't fade if a child of the control bar has focus
+        if (document.getElementById('noVNC_control_bar')
+                .contains(document.activeElement) && document.hasFocus()) {
+            UI.activateControlbar();
+            return;
+        }
+
         document.getElementById('noVNC_control_bar_anchor')
             .classList.add("noVNC_idle");
     },