Bug 1473199: Make permission controls tabbable again in the identity popup. r?johannh
Now that the PanelMultiView keyboard navigation code is being used for the identity popup, these need a class of subviewkeynav in order to be tabbable.
MozReview-Commit-ID: 47drdy78s4F
--- a/browser/base/content/browser-siteIdentity.js
+++ b/browser/base/content/browser-siteIdentity.js
@@ -1025,17 +1025,17 @@ var gIdentityHandler = {
let isPolicyPermission = aPermission.scope == SitePermissions.SCOPE_POLICY;
if (aPermission.id == "popup" && !isPolicyPermission) {
let menulist = document.createElement("menulist");
let menupopup = document.createElement("menupopup");
let block = document.createElement("vbox");
block.setAttribute("id", "identity-popup-popup-container");
menulist.setAttribute("sizetopopup", "none");
- menulist.setAttribute("class", "identity-popup-popup-menulist");
+ menulist.setAttribute("class", "identity-popup-popup-menulist subviewkeynav");
menulist.setAttribute("id", "identity-popup-popup-menulist");
for (let state of SitePermissions.getAvailableStates(aPermission.id)) {
let menuitem = document.createElement("menuitem");
// We need to correctly display the default/unknown state, which has its
// own integer value (0) but represents one of the other states.
if (state == SitePermissions.getDefault(aPermission.id)) {
menuitem.setAttribute("value", "0");
@@ -1088,17 +1088,17 @@ var gIdentityHandler = {
/* We return the permission item here without a remove button if the permission is a
SCOPE_POLICY permission. Policy permissions cannot be removed/changed for the duration
of the browser session. */
if (isPolicyPermission) {
return container;
}
let button = document.createElement("button");
- button.setAttribute("class", "identity-popup-permission-remove-button");
+ button.setAttribute("class", "identity-popup-permission-remove-button subviewkeynav");
let tooltiptext = gNavigatorBundle.getString("permissions.remove.tooltip");
button.setAttribute("tooltiptext", tooltiptext);
button.addEventListener("command", () => {
let browser = gBrowser.selectedBrowser;
this._permissionList.removeChild(container);
if (aPermission.sharingState &&
["camera", "microphone", "screen"].includes(aPermission.id)) {
let windowId = this._sharingState.windowId;
@@ -1144,17 +1144,17 @@ var gIdentityHandler = {
indicator.setAttribute("align", "center");
indicator.setAttribute("id", "blocked-popup-indicator-item");
let icon = document.createElement("image");
icon.setAttribute("class", "popup-subitem identity-popup-permission-icon");
let text = document.createElement("label");
text.setAttribute("flex", "1");
- text.setAttribute("class", "identity-popup-permission-label text-link");
+ text.setAttribute("class", "identity-popup-permission-label text-link subviewkeynav");
let popupCount = gBrowser.selectedBrowser.blockedPopups.length;
let messageBase = gNavigatorBundle.getString("popupShowBlockedPopupsIndicatorText");
let message = PluralForm.get(popupCount, messageBase)
.replace("#1", popupCount);
text.textContent = message;
text.addEventListener("click", () => {