]> git.proxmox.com Git - mirror_novnc.git/blobdiff - app/ui.js
Keep the connect panel when missing host or port
[mirror_novnc.git] / app / ui.js
index f84b3b7eb07718aa8dacbb0e7b1e9d88597a04a3..889ceaa5d19382afabf0234e9e864f8199fd3143 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -420,6 +420,7 @@ var UI;
             } else {
                 document.documentElement.classList.remove("noVNC_connected");
                 UI.updateXvpButton(0);
+                UI.keepControlbar();
             }
 
             // State change disables viewport dragging.
@@ -469,8 +470,8 @@ var UI;
                 time = 1500;
             }
 
-            // A specified time of zero means no timeout
-            if (time != 0) {
+            // Error messages do not timeout
+            if (status_type !== 'error') {
                 UI.statusTimeout = window.setTimeout(UI.hideStatus, time);
             }
         },
@@ -928,8 +929,6 @@ var UI;
         },
 
         connect: function() {
-            UI.closeAllPanels();
-
             var host = document.getElementById('noVNC_setting_host').value;
             var port = document.getElementById('noVNC_setting_port').value;
             var password = document.getElementById('noVNC_setting_password').value;
@@ -948,6 +947,8 @@ var UI;
 
             if (!UI.initRFB()) return;
 
+            UI.closeAllPanels();
+
             UI.rfb.set_encrypt(UI.getSetting('encrypt'));
             UI.rfb.set_true_color(UI.getSetting('true_color'));
             UI.rfb.set_local_cursor(UI.getSetting('cursor'));