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
--- 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);