Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Disable Screenshots page action on non-http(s) pages #4121

Closed
jaredhirsch opened this issue Feb 15, 2018 · 2 comments
Closed

Disable Screenshots page action on non-http(s) pages #4121

jaredhirsch opened this issue Feb 15, 2018 · 2 comments
Assignees

Comments

@jaredhirsch
Copy link
Member

(I think this bug may already exist, but I can't find it right now.)

Some about pages, like about:telemetry or about:mozilla, show the page action menu, and the Screenshots item is enabled there, but it shouldn't be.

The webcompat reporter disables itself in such cases like this: (dxr):

  onLocationChange(window) {
    let action = PageActions.actionForID("webcompat-reporter-button");
    let scheme = window.gBrowser.currentURI.scheme;
    let isReportable = ["http", "https"].includes(scheme);
    action.setDisabled(!isReportable, window);
  },

where onLocationChange is attached inside the PageActions.addAction call (dxr):

    PageActions.addAction(new PageActions.Action({
      // ... stuff ...
      onLocationChange: (window) => this.onLocationChange(window)
    }));

We should do something similar. (See BMO bug 1437445 for more discussion.)

@jaredhirsch
Copy link
Member Author

Hmm, if we land #3967, I guess this fix wouldn't work

@ianb
Copy link
Contributor

ianb commented Feb 20, 2018

I think with #3976 this will be fixed or at least better, so let's defer to that change.

@ianb ianb closed this as completed Feb 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants