From: Darren Date: Sun, 4 May 2014 20:40:08 +0000 (+0100) Subject: Don't automatically give focus when within an iframe X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4b978ed27fb708a6ef5041209f5de1351e937dcb;p=KiwiIRC.git Don't automatically give focus when within an iframe --- 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(); + } }); },