Bug 1389721 - fix page action menu to deal with not being passed an event, so the 'save link to pocket' context menu works, r=jaws

This also removes the now-obsolete onBeforeCommand method from the pocket code.

MozReview-Commit-ID: EjrMoAIv3xw

--HG--
extra : rebase_source : 0921854ff6d1110a35bb225d946cea3caa2ae3c1
This commit is contained in:
Gijs Kruitbosch 2017-10-02 20:34:01 +01:00
parent b852f82f5a
commit 8dea08a240
2 changed files with 1 additions and 5 deletions

View File

@ -461,7 +461,7 @@ var BrowserPageActions = {
},
doCommandForAction(action, event, buttonNode) {
if (event.type == "click" && event.button != 0) {
if (event && event.type == "click" && event.button != 0) {
return;
}
PageActions.logTelemetry("used", action, buttonNode);

View File

@ -32,10 +32,6 @@ var Pocket = {
/**
* Functions related to the Pocket panel UI.
*/
onBeforeCommand(event) {
BrowserUtils.setToolbarButtonHeightProperty(event.target);
},
onShownInPhotonPageActionPanel(panel, iframe) {
let window = panel.ownerGlobal;
window.pktUI.setPhotonPageActionPanelFrame(iframe);