mirror of
https://github.com/novnc/noVNC.git
synced 2026-05-28 07:59:40 +00:00
Trigger autoconnect at proper time
It needs to happen after everything is fully initialised.
This commit is contained in:
16
app/ui.js
16
app/ui.js
@@ -115,14 +115,6 @@ var UI;
|
||||
UI.initSetting('repeaterID', '');
|
||||
UI.initSetting('token', '');
|
||||
|
||||
var autoconnect = WebUtil.getConfigVar('autoconnect', false);
|
||||
if (autoconnect === 'true' || autoconnect == '1') {
|
||||
autoconnect = true;
|
||||
UI.connect();
|
||||
} else {
|
||||
autoconnect = false;
|
||||
}
|
||||
|
||||
UI.updateVisualState();
|
||||
|
||||
document.getElementById('noVNC_setting_host').focus();
|
||||
@@ -194,6 +186,14 @@ var UI;
|
||||
// Add mouse event click/focus/blur event handlers to the UI
|
||||
UI.addMouseHandlers();
|
||||
|
||||
var autoconnect = WebUtil.getConfigVar('autoconnect', false);
|
||||
if (autoconnect === 'true' || autoconnect == '1') {
|
||||
autoconnect = true;
|
||||
UI.connect();
|
||||
} else {
|
||||
autoconnect = false;
|
||||
}
|
||||
|
||||
if (typeof callback === "function") {
|
||||
callback(UI.rfb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user