Bug 1555222 - Show the protections panel when meta+clicking the identity box. r=johannh

Differential Revision: https://phabricator.services.mozilla.com/D32951

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nihanth Subramanya 2019-05-31 18:24:08 +00:00
Родитель 749db71829
Коммит 0533c377b1
2 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -868,10 +868,8 @@ var gIdentityHandler = {
* Click handler for the identity-box element in primary chrome.
*/
handleIdentityButtonEvent(event) {
// For Nightly users, show the WIP protections panel if the tracking
// protection icon was clicked.
if (this._protectionsPanelEnabled &&
event.originalTarget.id == "tracking-protection-icon-animatable-image") {
// For Nightly users, show the WIP protections panel if the meta key was held.
if (this._protectionsPanelEnabled && event.metaKey) {
gProtectionsHandler.handleProtectionsButtonEvent(event);
return;
}

Просмотреть файл

@ -39,7 +39,7 @@ var gProtectionsHandler = {
this.refreshProtectionsPopup();
// Now open the popup, anchored off the primary chrome element
PanelMultiView.openPopup(this._protectionsPopup, this._protectionsIconBox, {
PanelMultiView.openPopup(this._protectionsPopup, gIdentityHandler._identityIcon, {
position: "bottomcenter topleft",
triggerEvent: event,
}).catch(Cu.reportError);