Bug 942946 - ESC closes Responsive Design Mode while opening Web Console split view. r=paul
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 25 Nov 2013 13:25:25 -0600
changeset 158277 ad0b0ca62e46f761bd67933995dd45f67870c9d5
parent 158276 6efabfb144b1cc0864fb4ce877534107965b0728
child 158278 080eb0c6441b1b6e0a0b5c15ef84909e62ecb50a
push id3739
push userryanvm@gmail.com
push dateMon, 02 Dec 2013 18:05:56 +0000
treeherderfx-team@d55d9500d535 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaul
bugs942946
milestone28.0a1
Bug 942946 - ESC closes Responsive Design Mode while opening Web Console split view. r=paul
browser/devtools/responsivedesign/responsivedesign.jsm
browser/themes/shared/devtools/responsivedesign.inc.css
--- a/browser/devtools/responsivedesign/responsivedesign.jsm
+++ b/browser/devtools/responsivedesign/responsivedesign.jsm
@@ -171,17 +171,17 @@ function ResponsiveUI(aWindow, aTab)
   this.bound_startResizing = this.startResizing.bind(this);
   this.bound_stopResizing = this.stopResizing.bind(this);
   this.bound_onDrag = this.onDrag.bind(this);
   this.bound_onKeypress = this.onKeypress.bind(this);
 
   // Events
   this.tab.addEventListener("TabClose", this);
   this.tabContainer.addEventListener("TabSelect", this);
-  this.mainWindow.document.addEventListener("keypress", this.bound_onKeypress, false);
+  this.mainWindow.document.addEventListener("keypress", this.bound_onKeypress, true);
 
   this.buildUI();
   this.checkMenus();
 
   this.docShell = this.browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIWebNavigation)
                       .QueryInterface(Ci.nsIDocShell);
 
@@ -271,17 +271,17 @@ ResponsiveUI.prototype = {
                 "max-height: none;" +
                 "min-height: 0;";
     this.stack.setAttribute("style", style);
 
     if (this.isResizing)
       this.stopResizing();
 
     // Remove listeners.
-    this.mainWindow.document.removeEventListener("keypress", this.bound_onKeypress, false);
+    this.mainWindow.document.removeEventListener("keypress", this.bound_onKeypress, true);
     this.menulist.removeEventListener("select", this.bound_presetSelected, true);
     this.tab.removeEventListener("TabClose", this);
     this.tabContainer.removeEventListener("TabSelect", this);
     this.rotatebutton.removeEventListener("command", this.bound_rotate, true);
     this.screenshotbutton.removeEventListener("command", this.bound_screenshot, true);
     this.touchbutton.removeEventListener("command", this.bound_touch, true);
     this.closebutton.removeEventListener("command", this.bound_close, true);
     this.addbutton.removeEventListener("command", this.bound_addPreset, true);
--- a/browser/themes/shared/devtools/responsivedesign.inc.css
+++ b/browser/themes/shared/devtools/responsivedesign.inc.css
@@ -12,16 +12,20 @@
 }
 
 .browserStack[responsivemode] {
   box-shadow: 0 0 7px black;
 }
 
 .devtools-responsiveui-toolbar {
   background: transparent;
+  /* text color is textColor from dark theme, since no theme is applied to
+   * the responsive toolbar.
+   */
+  color: hsl(210,30%,85%);
   margin: 10px 0;
   padding: 0;
   box-shadow: none;
   border-bottom-width: 0;
 }
 
 .devtools-responsiveui-toolbar > menulist,
 .devtools-responsiveui-toolbar > toolbarbutton {