From: Chris Porter Date: Sat, 24 Apr 2010 15:47:06 +0000 (+0100) Subject: Don't steal focus if we're inside an iframe. X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/commitdiff_plain/9a1c691c0de3c2f523097cd40427f7e31810f031 Don't steal focus if we're inside an iframe. --- diff --git a/js/ui/panes/connect.js b/js/ui/panes/connect.js index 3c5fc3a..9f8b539 100644 --- a/js/ui/panes/connect.js +++ b/js/ui/panes/connect.js @@ -84,6 +84,9 @@ qwebirc.ui.ConfirmBox = function(parentElement, callback, initialNickname, initi td.appendChild(auth); auth.addEvent("click", qwebirc.ui.AuthLogin); } + + if(!window != window.top) + yes.focus(); } qwebirc.ui.LoginBox = function(parentElement, callback, initialNickname, initialChannels, networkName) { @@ -233,7 +236,8 @@ qwebirc.ui.LoginBox = function(parentElement, callback, initialNickname, initial nick.set("value", initialNickname); chan.set("value", initialChannels); - nick.focus(); + if(!window != window.top) + nick.focus(); } qwebirc.ui.authShowHide = function(checkbox, authRow, usernameBox, usernameRow, passwordRow) {