From a02dae3c60ebe0f2e2f0f06a9f9086cc4e2ae8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Thu, 6 Nov 2008 20:20:34 +0100 Subject: [PATCH] Bug 463299 - Hitting Esc when text was entered in the search box shouldn't close the all tabs / ctrl-tab panel. r=gavin --- browser/base/content/browser-tabPreviews.js | 7 ++++--- browser/base/content/browser.xul | 2 +- browser/base/content/test/browser_ctrlTab.js | 8 ++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser-tabPreviews.js b/browser/base/content/browser-tabPreviews.js index 62a0bdcba89..9e846516514 100644 --- a/browser/base/content/browser-tabPreviews.js +++ b/browser/base/content/browser-tabPreviews.js @@ -434,7 +434,9 @@ var ctrlTab = { onKeyPress: function ctrlTab__onKeyPress(event) { var isOpen = this.isOpen; - if (isOpen && event.target == this.searchField) + if (isOpen && + event.target == this.searchField && + event.keyCode != event.DOM_VK_ESCAPE) return; if (isOpen) { @@ -615,8 +617,7 @@ var ctrlTab = { case "keydown": case "keyup": if (event.target == this.searchField) { - if (event.keyCode == event.DOM_VK_RETURN || - event.keyCode == event.DOM_VK_ESCAPE) + if (event.keyCode == event.DOM_VK_RETURN) this.panel.focus(); } else { // Manually consume the events, as the panel is open but doesn't diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 80e6a1080e6..b8a2c0e176a 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -233,7 +233,7 @@