mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 817539 - [toolbox] close the responsive mode on ESC, even if toolbox is up, r=vporof
This commit is contained in:
parent
0d9d123370
commit
644d5fd0a2
@ -158,9 +158,6 @@ function ResponsiveUI(aWindow, aTab)
|
||||
this.buildUI();
|
||||
this.checkMenus();
|
||||
|
||||
let target = TargetFactory.forTab(this.tab);
|
||||
this.toolboxWasOpen = !!gDevTools.getToolbox(target);
|
||||
|
||||
try {
|
||||
if (Services.prefs.getBoolPref("devtools.responsiveUI.rotate")) {
|
||||
this.rotate();
|
||||
@ -239,17 +236,9 @@ ResponsiveUI.prototype = {
|
||||
if (aEvent.keyCode == this.mainWindow.KeyEvent.DOM_VK_ESCAPE &&
|
||||
this.mainWindow.gBrowser.selectedBrowser == this.browser) {
|
||||
|
||||
// If the toolbox wasn't open at first but is open now,
|
||||
// we don't want to close the Responsive Mode on Escape.
|
||||
// We let the toolbox close first.
|
||||
|
||||
let target = TargetFactory.forTab(this.tab);
|
||||
let isToolboxOpen = !!gDevTools.getToolbox(target);
|
||||
if (this.toolboxWasOpen || !isToolboxOpen) {
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
this.close();
|
||||
}
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
this.close();
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user