Bug 817705 - [toolbox] Disable Inspect Mode when switching tools in Toolbox. r=jwalker
authorPaul Rouget <paul@mozilla.com>
Tue, 11 Dec 2012 06:17:00 +0100
changeset 125537 3f2d435dfe60bb977edebf55bff1f4c52f42cdca
parent 125536 315ff93a4d9046d9aa0c988513f5e64b549d905b
child 125538 8ba98799b6bbf1a6aa20470d7f22780fc72ad300
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalker
bugs817705
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 817705 - [toolbox] Disable Inspect Mode when switching tools in Toolbox. r=jwalker
browser/devtools/inspector/Highlighter.jsm
--- a/browser/devtools/inspector/Highlighter.jsm
+++ b/browser/devtools/inspector/Highlighter.jsm
@@ -134,18 +134,23 @@ Highlighter.prototype = {
     this.selection.on("new-node", this.highlight);
     this.selection.on("new-node", this.updateInfobar);
     this.selection.on("detached", this.highlight);
     this.selection.on("pseudoclass", this.updateInfobar);
     this.selection.on("attribute-changed", this.updateInfobar);
 
     this.onToolSelected = function(event, id) {
       if (id != "inspector") {
+        this.chromeWin.clearTimeout(this.pageEventsMuter);
+        this.detachMouseListeners();
         this.hide();
       } else {
+        if (!this.locked) {
+          this.attachMouseListeners();
+        }
         this.show();
       }
     }.bind(this);
     this.toolbox.on("select", this.onToolSelected);
 
     this.hidden = true;
     this.highlight();
   },