summaryrefslogtreecommitdiffhomepage
path: root/html/whiteboard.js
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-02-08 19:04:55 +0100
committerRoland Reichwein <mail@reichwein.it>2023-02-08 19:04:55 +0100
commit2ddb1ffe419af7189fa406978411db7d03eb8f35 (patch)
tree16a580daee6946dc4eb8b116113a79cdf8a70e11 /html/whiteboard.js
parent04c949087180684fe8e132345f0e9e787a04f7ee (diff)
Focus on reconnect button, if available
Diffstat (limited to 'html/whiteboard.js')
-rw-r--r--html/whiteboard.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/html/whiteboard.js b/html/whiteboard.js
index b11dc96..38f972f 100644
--- a/html/whiteboard.js
+++ b/html/whiteboard.js
@@ -169,16 +169,19 @@ function connect_websocket() {
websocket.send("<request><command>getversion</command></request>");
websocket.send("<request><command>getfile</command><id>" + get_id() + "</id></request>");
set_status(""); // ok
+ document.getElementById("board").focus();
};
websocket.onclose = function(e) {
alert("Server connection closed.");
document.getElementById("reconnect").style.display = 'inline';
+ document.getElementById("reconnect").focus();
};
websocket.onerror = function(e) {
alert("Error: Server connection closed.");
document.getElementById("reconnect").style.display = 'inline';
+ document.getElementById("reconnect").focus();
};
}
@@ -264,9 +267,6 @@ function on_input()
revisionElement.appendChild(document.createTextNode(revision));
requestElement.appendChild(revisionElement);
- //Module.onRuntimeInitialized = () => { alert("DEBUG: " + Module._getnum(1) + " " + UTF8ToString(Module._getstring(allocateUTF8("abc"))));
- //_free(allocateUTF8("abc"));
- //};
var old_version = allocateUTF8(baseline);
var new_version = allocateUTF8(baseline_candidate);
var diff = Module._diff_create(old_version, new_version);