Bug 818411 - [markup view] once the toolbox is re-attached to the tab, the markup view keybindings don't work anymore. r=jwalker
authorPaul Rouget <paul@mozilla.com>
Wed, 12 Dec 2012 03:04:00 +0100
changeset 125536 315ff93a4d9046d9aa0c988513f5e64b549d905b
parent 125535 a5793af7e70c262a8d00b82e3e38642516f5406f
child 125537 3f2d435dfe60bb977edebf55bff1f4c52f42cdca
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
bugs818411
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 818411 - [markup view] once the toolbox is re-attached to the tab, the markup view keybindings don't work anymore. r=jwalker
browser/devtools/markupview/MarkupView.jsm
--- a/browser/devtools/markupview/MarkupView.jsm
+++ b/browser/devtools/markupview/MarkupView.jsm
@@ -53,17 +53,17 @@ this.MarkupView = function MarkupView(aI
 
   this._observer = new this.doc.defaultView.MutationObserver(this._mutationObserver.bind(this));
 
   this._boundOnNewSelection = this._onNewSelection.bind(this);
   this._inspector.selection.on("new-node", this._boundOnNewSelection);
   this._onNewSelection();
 
   this._boundKeyDown = this._onKeyDown.bind(this);
-  this._frame.addEventListener("keydown", this._boundKeyDown, false);
+  this._frame.contentWindow.addEventListener("keydown", this._boundKeyDown, false);
 
   this._boundFocus = this._onFocus.bind(this);
   this._frame.addEventListener("focus", this._boundFocus, false);
 
   this._initPreview();
 }
 
 MarkupView.prototype = {
@@ -485,17 +485,17 @@ MarkupView.prototype = {
     delete this._boundFocus;
 
     this._frame.contentWindow.removeEventListener("scroll", this._boundUpdatePreview, true);
     this._frame.contentWindow.removeEventListener("resize", this._boundUpdatePreview, true);
     this._frame.contentWindow.removeEventListener("overflow", this._boundResizePreview, true);
     this._frame.contentWindow.removeEventListener("underflow", this._boundResizePreview, true);
     delete this._boundUpdatePreview;
 
-    this._frame.removeEventListener("keydown", this._boundKeyDown, true);
+    this._frame.contentWindow.removeEventListener("keydown", this._boundKeyDown, true);
     delete this._boundKeyDown;
 
     this._inspector.selection.off("new-node", this._boundOnNewSelection);
     delete this._boundOnNewSelection;
 
     delete this._elt;
 
     delete this._containers;