Don't automatically give focus when within an iframe
authorDarren <darren@darrenwhitlen.com>
Sun, 4 May 2014 20:40:08 +0000 (21:40 +0100)
committerDarren <darren@darrenwhitlen.com>
Sun, 4 May 2014 20:40:08 +0000 (21:40 +0100)
client/src/applets/startup.js

index 23c9d7fdcd0bf6044dcb66d0bae62c7d4e1aeefa..839732c72423ed299c89ce871c87c8a70fe54a93 100644 (file)
                     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();
+                }
             });
         },