summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/ui.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/ui.js b/app/ui.js
index 1b30c8b..b682c37 100644
--- a/app/ui.js
+++ b/app/ui.js
@@ -1120,6 +1120,9 @@ var UI = {
},
setPassword: function(e) {
+ // Prevent actually submitting the form
+ e.preventDefault();
+
var inputElem = document.getElementById('noVNC_password_input');
var password = inputElem.value;
// Clear the input after reading the password
@@ -1128,8 +1131,6 @@ var UI = {
UI.reconnect_password = password;
document.getElementById('noVNC_password_dlg')
.classList.remove('noVNC_open');
- // Prevent actually submitting the form
- e.preventDefault();
},
/* ------^-------