Bug 1437324 - Wrap popup permission indicator text in the Site Identity Panel when it exceeds the width of the panel. r?johannh draft
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Sat, 03 Mar 2018 19:19:42 +0530
changeset 763240 b38a4f8da06a5661cb58eea3f119f0b3485129ae
parent 761894 426ef843d356879b3d1079d0ea7d867ff5a71b8c
push id101370
push userbmo:prathikshaprasadsuman@gmail.com
push dateMon, 05 Mar 2018 15:36:06 +0000
reviewersjohannh
bugs1437324
milestone60.0a1
Bug 1437324 - Wrap popup permission indicator text in the Site Identity Panel when it exceeds the width of the panel. r?johannh textContent is used to set the indicator label text here instead of the value attribute because the text set using the value attribute does not wrap when it exceeds the width of the panel, which in turn pushes the menulist and half of the indicator text out of view. MozReview-Commit-ID: 1VBaQlbZwzQ
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -8242,17 +8242,17 @@ var gIdentityHandler = {
     let text = document.createElement("label");
     text.setAttribute("flex", "1");
     text.setAttribute("class", "identity-popup-permission-label text-link");
 
     let popupCount = gBrowser.selectedBrowser.blockedPopups.length;
     let messageBase = gNavigatorBundle.getString("popupShowBlockedPopupsIndicatorText");
     let message = PluralForm.get(popupCount, messageBase)
                                  .replace("#1", popupCount);
-    text.setAttribute("value", message);
+    text.textContent = message;
 
     text.addEventListener("click", () => {
       gPopupBlockerObserver.showAllBlockedPopups(gBrowser.selectedBrowser);
     });
 
     indicator.appendChild(icon);
     indicator.appendChild(text);