Bug 1496718 - Stop clobbering gURLBar when exiting customize mode. r=gijs
authorDão Gottwald <dao@mozilla.com>
Fri, 05 Oct 2018 18:35:46 +0200
changeset 488136 821354ee31d94e03d2389dec1d72dd1def6c525d
parent 488135 0cf6d7594c4897d43321b825ab663a7b8a4e17af
child 488137 7c132c5ae38d40a3fdf6e5d4fa13065d6922cf4d
push id246
push userfmarier@mozilla.com
push dateSat, 13 Oct 2018 00:15:40 +0000
reviewersgijs
bugs1496718
milestone64.0a1
Bug 1496718 - Stop clobbering gURLBar when exiting customize mode. r=gijs
browser/base/content/browser-customization.js
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -38,30 +38,19 @@ var CustomizationHandler = {
 
     UpdateUrlbarSearchSplitterState();
 
     PlacesToolbarHelper.customizeStart();
   },
 
   _customizationEnding(aDetails) {
     // Update global UI elements that may have been added or removed
-    if (aDetails.changed) {
-      gURLBar = document.getElementById("urlbar");
-
-      if (AppConstants.platform != "macosx")
-        updateEditUIVisibility();
-
-      // Hacky: update the PopupNotifications' object's reference to the iconBox,
-      // if it already exists, since it may have changed if the URL bar was
-      // added/removed.
-      if (!window.__lookupGetter__("PopupNotifications")) {
-        PopupNotifications.iconBox =
-          document.getElementById("notification-popup-box");
-      }
-
+    if (aDetails.changed &&
+        AppConstants.platform != "macosx") {
+      updateEditUIVisibility();
     }
 
     PlacesToolbarHelper.customizeDone();
 
     UpdateUrlbarSearchSplitterState();
 
     // Update the urlbar
     URLBarSetURI();