From 4b978ed27fb708a6ef5041209f5de1351e937dcb Mon Sep 17 00:00:00 2001 From: Darren Date: Sun, 4 May 2014 21:40:08 +0100 Subject: [PATCH] Don't automatically give focus when within an iframe --- client/src/applets/startup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/applets/startup.js b/client/src/applets/startup.js index 23c9d7f..839732c 100644 --- a/client/src/applets/startup.js +++ b/client/src/applets/startup.js @@ -30,7 +30,10 @@ connection_dialog.view.infoBoxShow(); } - connection_dialog.view.$el.find('.nick').select(); + // Only set focus if we're not within an iframe. (firefox auto scrolls to the embedded client on page load - bad) + if (window == window.top) { + connection_dialog.view.$el.find('.nick').select(); + } }); }, -- 2.25.1