mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 476020 - Pressing Esc while having the tag autocomplete open closes the bookmarks panel, r=dietrich
This commit is contained in:
parent
9bbf429fa6
commit
018df7819f
@ -113,12 +113,13 @@ var StarUI = {
|
||||
break;
|
||||
case "keypress":
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE) {
|
||||
// In edit mode, if we're not editing a folder, the ESC key is mapped
|
||||
// to the cancel button
|
||||
// If the panel is visible the ESC key is mapped to the cancel button
|
||||
// unless we are editing a folder in the folderTree, or an
|
||||
// autocomplete popup is open.
|
||||
if (!this._element("editBookmarkPanelContent").hidden) {
|
||||
var elt = aEvent.target;
|
||||
if (elt.localName != "tree" ||
|
||||
(elt.localName == "tree" && !elt.hasAttribute("editing")))
|
||||
if ((elt.localName != "tree" || !elt.hasAttribute("editing")) &&
|
||||
!elt.popupOpen)
|
||||
this.cancelButtonOnCommand();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user