[Pkg-mozext-commits] [firebug] 02/22: Issue 7546: Console grabs focus when creating a new tab

David Prévot taffit at moszumanska.debian.org
Sat Jul 19 21:45:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit 0ced84afb32967b58fbf33a7e22836539f8adb8f
Author: Florent FAYOLLE <florent.fayolle69 at gmail.com>
Date:   Sat Jun 21 13:38:24 2014 +0200

    Issue 7546:  Console grabs focus when creating a new tab
---
 extension/content/firebug/console/consolePanel.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/extension/content/firebug/console/consolePanel.js b/extension/content/firebug/console/consolePanel.js
index 82874c1..eb369da 100644
--- a/extension/content/firebug/console/consolePanel.js
+++ b/extension/content/firebug/console/consolePanel.js
@@ -217,6 +217,10 @@ ConsolePanel.prototype = Obj.extend(ActivablePanel,
         // (previousPanelName is undefined in this case).
         var hasSwitchedPanel = (this.context.panelName !== this.context.previousPanelName);
 
+        // Prevent Firebug stealing the focus to a new tab with an "about:" page
+        // (about:blank, about:newtab). See issue 7546.
+        var isAboutLocation = (this.context.window.location.href.startsWith("about:"));
+
         // Cover these three cases:
         // - Opening Firebug should focus Command Line (issue 6620)
         // - Switching to Console panel without Firebug being focused should focus the Command Line
@@ -226,7 +230,7 @@ ConsolePanel.prototype = Obj.extend(ActivablePanel,
         //
         // xxxFlorent: FIXME? Opening Firebug twice in detached mode on the same webpage doesn't
         // give the Focus to the Command Line.
-        if (this.context.window.document.readyState === "complete" &&
+        if (this.context.window.document.readyState === "complete" && !isAboutLocation &&
             !(Firebug.isDetached() && !hasSwitchedPanel))
         {
             CommandLine.focus(this.context);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list