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 draft
authorJared Wein <jwein@mozilla.com>
Tue, 03 Jan 2017 17:02:09 -0500
changeset 455460 d0ba79cdb43332f4aff5121cfa2acbbc0d4965dd
parent 455333 cad2ea346d06ec5a3a70eda912513201dff0c21e
child 541000 f9456b9a8bbe08d8a5d02faced3b7a8ec369e157
push id40249
push userbmo:jaws@mozilla.com
push dateTue, 03 Jan 2017 22:02:37 +0000
reviewersgijs
bugs1326712
milestone53.0a1
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
browser/base/content/browser-places.js
--- 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: