From 983c8d10adab57e50289dcab7bcee0616318857f Mon Sep 17 00:00:00 2001 From: Lucas Rocha Date: Fri, 19 Aug 2011 09:29:23 -0700 Subject: [PATCH] Bug 666257 - Dismiss dialogs before panels with Escape key (r=mbrubeck) There are cases where we show dialogs on top of panels (e.g. sync connection dialog). We want Escape key to dismiss them before the panels. --- mobile/chrome/content/browser-ui.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 24d387afca9a..1a692c82710c 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -890,16 +890,16 @@ var BrowserUI = { return; } - // Check active panel - if (this.activePanel) { - this.activePanel = null; + // Check open dialogs + let dialog = this.activeDialog; + if (dialog && dialog != this.activePanel) { + dialog.close(); return; } - // Check open dialogs - let dialog = this.activeDialog; - if (dialog) { - dialog.close(); + // Check active panel + if (this.activePanel) { + this.activePanel = null; return; }