Closed Bug 1783877 Opened 2 years ago Closed 2 years ago

Inspector and Source Quickactions should be disabled if already opened

Categories

(Firefox :: Address Bar, defect)

Firefox 105
defect

Tracking

()

VERIFIED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox103 --- unaffected
firefox104 --- unaffected
firefox105 --- disabled
firefox106 --- verified

People

(Reporter: phorea, Assigned: daisuke)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Note
This issue applies for Open Inspector and View Source QuickActions

Found in

  • 105.0a1 2022-08-09

Affected versions

  • latest Nightly 105.0a1 2022-08-09

Affected platforms

  • Win 10 64-bit

Steps to reproduce

  1. Open a random page
  2. Focus address bar and type devtools -> Open Inspector quick action button is shown
  3. Select the Open Inspector quick action button -> Inspector Devtools tab is opened
  4. Redo the above steps on the same page
  5. Open https://www.wikipedia.org/, focus the address bar and type source, then open View source quickaction
  6. On the viewsource:https://www.wikipedia.org/ page, redo the previous step

Expected result
4. Open Inspector quick action button should be disabled if already opened
6. View Source quick action should be disabled if view-source: is the target

Actual result
4. Open Inspector quick action button can be selected again, in which case the Inspector tab gains focus
6. view-source:view-source:https://www.wikipedia.org/ (loads forever) is opened in new tab

Regression range

  • Not a regression
Has STR: --- → yes
Assignee: nobody → daisuke
Status: NEW → ASSIGNED

I have a question about the spec for View Source action.
Currently, when we select View Source item in the general context menu, even if the page of the same View Source URL is already opened, we open the URL in the new tab. I imagine the reason why we do is that can compare the source between old and new, perhaps? Anyway, I am thinking that we might better fit the consistency with the context menu, what do you think?
If the above thinking is not good, instead of the button disable, it might be better to select the tab that is opening the View Source page already, I thought. What do you think?

Flags: needinfo?(petruta.rasa)
Flags: needinfo?(dharvey)

(In reply to Daisuke Akatsuka (:daisuke) from comment #1)

I have a question about the spec for View Source action.
Currently, when we select View Source item in the general context menu, even if the page of the same View Source URL is already opened, we open the URL in the new tab. I imagine the reason why we do is that can compare the source between old and new, perhaps? Anyway, I am thinking that we might better fit the consistency with the context menu, what do you think?
If the above thinking is not good, instead of the button disable, it might be better to select the tab that is opening the View Source page already, I thought. What do you think?

Petruta is in PTO, so I'll take this NI. I'm a bit confused with the above: the view-source context menu option is disabled for a view-source:https://page, so I'd assume we'd need to do the same with the action if it's displayed on a view-source:https://page open page.
Otherwise, if I want to view-source 5 times from the quickaction, we should allow that if it's done on the original https://page, since that would be the same as context menu: is this what you mean @Daisuke ?

I think the fix here should be checking the current address when we're loading the quickactions, if it's view-source:, then the quickaction "View source" should be disabled.

Flags: needinfo?(petruta.rasa) → needinfo?(daisuke)

Yes current the view source quickaction and contact menu seem to act the same on standard content pages, which is open a new view-source: tab regardless of whether there is one open, I think we should keep those behaving the same.

The issue is for seeing the viewsource quickaction when you are viewing a page like view-source:https://www.bbc.co.uk/, in those cases the contact menu is disabled also and we should do that too, ideally there is a check somewhere that we already use for the context menu that we can use / copy

Flags: needinfo?(dharvey)

Thank you very much, Adrian and Dale!
Thanks to you, I could understand what we should do.

  • On the normal web content, we open a new view-source tab anytime.
  • On the view-source content, we disable the quick action.

Thanks!

Flags: needinfo?(daisuke)
Blocks: 1786976
Pushed by dakatsuka.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9bebcb1ca68d
Disable inspector quick action if already opening. r=daleharvey,jdescottes
https://hg.mozilla.org/integration/autoland/rev/235f902f8e07
Make ViewSource active/inactive the same as the context menu. r=daleharvey
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

The patch landed in nightly and beta is affected.
:daisuke, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox105 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(daisuke)
Flags: needinfo?(daisuke)

Verified as fixed with 106.0a1 (2022-08-29) on Ubuntu 22, Mac 11 and Windows 10:

  • Inspector is disabled if Inspector is already active
  • View source is disabled if view-source:page is already open
Status: RESOLVED → VERIFIED
Blocks: 1838617
No longer blocks: 1838617
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: