Bug 1326712 - Allow hitting Enter on the Remove Bookmark button to remove the bookmark instead of performing the default action on the popup. r?gijs
MozReview-Commit-ID: AQ0Q4zb2g2Q
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -113,17 +113,18 @@ var StarUI = {
switch (aEvent.keyCode) {
case KeyEvent.DOM_VK_ESCAPE:
this.panel.hidePopup();
break;
case KeyEvent.DOM_VK_RETURN:
if (aEvent.target.classList.contains("expander-up") ||
aEvent.target.classList.contains("expander-down") ||
- aEvent.target.id == "editBMPanel_newFolderButton") {
+ aEvent.target.id == "editBMPanel_newFolderButton" ||
+ aEvent.target.id == "editBookmarkPanelRemoveButton") {
// XXX Why is this necessary? The defaultPrevented check should
// be enough.
break;
}
this.panel.hidePopup();
break;
// This case is for catching character-generating keypresses
case 0: