Bug 1365957 - On OSX, if the backspace key is used to delete a cookie we should not also close the dialog. r?johannh draft
authorJared Wein <jwein@mozilla.com>
Mon, 22 May 2017 13:27:28 -0400
changeset 582468 14f68518fc439099454961bde01109f58c246e51
parent 581397 1747d2c4926b1c8563b3335f9f810a9a6fd89a28
child 629788 a92b0465a5f505e004632d5cdce820da293f209d
push id60101
push userbmo:jaws@mozilla.com
push dateMon, 22 May 2017 17:27:46 +0000
reviewersjohannh
bugs1365957
milestone55.0a1
Bug 1365957 - On OSX, if the backspace key is used to delete a cookie we should not also close the dialog. r?johannh MozReview-Commit-ID: 8T1ay6987UC
browser/components/preferences/cookies.js
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -728,16 +728,17 @@ var gCookiesWindow = {
   },
 
   onCookieKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
       this.deleteCookie();
     } else if (AppConstants.platform == "macosx" &&
                aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {
       this.deleteCookie();
+      aEvent.preventDefault();
     }
   },
 
   _lastSortProperty: "",
   _lastSortAscending: false,
   sort(aProperty) {
     var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true;
     // Sort the Non-Filtered Host Collections