} else {
document.documentElement.classList.remove("noVNC_connected");
UI.updateXvpButton(0);
+ UI.keepControlbar();
}
// State change disables viewport dragging.
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);
}
},
},
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;
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'));