diff --git a/app/static/js/app.js b/app/static/js/app.js index 84667befc..e8e54ef26 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -327,6 +327,13 @@ menuBar.addEventListener("wifi-dialog-requested", () => { document.getElementById("wifi-overlay").show(); document.getElementById("wifi-dialog").initialize(); }); +menuBar.addEventListener("network-status-dialog-requested", () => { + // Note: we have to call `initialize()` after `show()`, to ensure that the + // dialog is able to focus the main input element. + // See https://github.com/tiny-pilot/tinypilot/issues/1770 + document.getElementById("network-status-overlay").show(); + document.getElementById("network-status-dialog").initialize(); +}); menuBar.addEventListener("fullscreen-requested", () => { document.getElementById("remote-screen").fullscreen = true; }); diff --git a/app/templates/custom-elements/menu-bar.html b/app/templates/custom-elements/menu-bar.html index 85d350089..e2809f087 100644 --- a/app/templates/custom-elements/menu-bar.html +++ b/app/templates/custom-elements/menu-bar.html @@ -239,6 +239,13 @@ >Static IP +