Closed Bug 1458591 Opened 2 years ago Closed 2 years ago

DevTools openWebLink helper is not working if DevTools are in a separate window

Categories

(DevTools :: General, defect, P2)

61 Branch
defect

Tracking

(firefox61 fixed)

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(2 files)

STRs:
- open devtools 
- undock
- meatball menu > click "Documentation..." or  "Community..."

ER: a new tab should open
AR: nothing happens
Comment on attachment 8972629 [details]
Bug 1458591 - Use most recent chrome window for DevTools link helper;

In other spots in the code base, we use Services.wm.getMostRecentWindow in order to get a valid window for opening links, so proposing this here.

Before I get into cleanup and test writing, do you think this approach is valid here or are there limitations to consider?
Attachment #8972629 - Flags: feedback?(jryans)
Comment on attachment 8972629 [details]
Bug 1458591 - Use most recent chrome window for DevTools link helper;

It seems fine to me.  I suggested[1] doing basically this to :birtles when he added the link helper, but for some reason it failed for him.  Maybe it was because things were renamed to `openWebLink` around the same time as his work?

Anyway, it _should_ be doable this way.

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1444301#c74
Attachment #8972629 - Flags: feedback?(jryans) → feedback+
Ah interesting, thanks for the feedback. Not sure how accurate the snippet from the initial comment is but:

  if (!win || !win.openUILinkIn !== "function") { return; }

is always going to be true and return. Hopefully this was the issue and not a tricky edge case.
Try is at https://treeherder.mozilla.org/#/jobs?repo=try&revision=1282628cb46bde1f809b0c23c3945e309f691bc9

(added a small changeset to remove an unused proptype, can move to separate bug if needed)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Comment on attachment 8972629 [details]
Bug 1458591 - Use most recent chrome window for DevTools link helper;

https://reviewboard.mozilla.org/r/241180/#review247110

Looks reasonable, thanks for working on it! :)
Attachment #8972629 - Flags: review?(jryans) → review+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5da4a0c6ba28
Use most recent chrome window for DevTools link helper;r=jryans
https://hg.mozilla.org/integration/autoland/rev/5be595f4f1d9
remove unused toolbar propType;r=jryans
https://hg.mozilla.org/mozilla-central/rev/5da4a0c6ba28
https://hg.mozilla.org/mozilla-central/rev/5be595f4f1d9
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Product: Firefox → DevTools
Depends on: 1467431
You need to log in before you can comment on or make changes to this bug.