Bug 1345687 - Allow identity popup to be shown irrespective of pageproxystate if a permission has been granted to the current site. r=johannh
MozReview-Commit-ID: 4Bjnkgf1m16
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7431,18 +7431,24 @@ var gIdentityHandler = {
event.stopPropagation();
if ((event.type == "click" && event.button != 0) ||
(event.type == "keypress" && event.charCode != KeyEvent.DOM_VK_SPACE &&
event.keyCode != KeyEvent.DOM_VK_RETURN)) {
return; // Left click, space or enter only
}
- // Don't allow left click, space or enter if the location has been modified.
- if (gURLBar.getAttribute("pageproxystate") != "valid") {
+ // Don't allow left click, space or enter if the location has been modified,
+ // so long as we're not sharing any devices.
+ // If we are sharing a device, the identity block is prevented by CSS from
+ // being focused (and therefore, interacted with) by the user. However, we
+ // want to allow opening the identity popup from the device control menu,
+ // which calls click() on the identity button, so we don't return early.
+ if (!this._sharingState &&
+ gURLBar.getAttribute("pageproxystate") != "valid") {
return;
}
this._popupTriggeredByKeyboard = event.type == "keypress";
// Make sure that the display:none style we set in xul is removed now that
// the popup is actually needed
this._identityPopup.hidden = false;