From 2ddb1ffe419af7189fa406978411db7d03eb8f35 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Wed, 8 Feb 2023 19:04:55 +0100 Subject: Focus on reconnect button, if available --- html/whiteboard.js | 6 +++--- 1 file 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("getversion"); websocket.send("getfile" + get_id() + ""); 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); -- cgit v1.2.3