Closed Bug 1706487 Opened 4 years ago Closed 3 years ago

"Open Image in New Tab" should load images in a background (rather than foreground) tab, like Chrome

Categories

(Firefox :: Menus, enhancement, P2)

Firefox 89
enhancement

Tracking

()

VERIFIED FIXED
90 Branch
Tracking Status
relnote-firefox --- 90+
firefox90 --- verified

People

(Reporter: tim_vdeynde, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

(Whiteboard: [proton-context-menus][parity-chrome] [priority:2a])

Attachments

(1 file)

Gijs asked me in bug 1699128 comment 13 to file a bug for this.

In Proton, the "View Image" context menu item was replaced with "Open Image in New Tab", supposedly to match other browsers' behaviour. However, the current behaviour doesn't match Chrome. Chrome will open images in a background tab, while Firefox will open them in the foreground.

Gijs thought this may have to do with browser.tabs.loadInBackground, but this doesn't seem to be the case. The behaviour I describe happens in a clean profile.

Regardless of which option is chosen as a default, I would like to ask to keep a modifier key to change the behaviour, since I believe both use cases are valuable.

Whiteboard: [parity-chrome] → [proton-context-menus][parity-chrome]
Summary: "Open Image in New Tab" differs from Chrome → "Open Image in New Tab" should load images in a background (rather than foreground) tab, like Chrome
Priority: -- → P2
Whiteboard: [proton-context-menus][parity-chrome] → [proton-context-menus][parity-chrome] [priority:2b]

No, I do not think we should change the behavior to open the image in a background tab, instead. I think the way this feature is behaving (opening a foreground tab) is what a user would expect, and we should have consistent behavior with "open link in new tab."

I didn’t think viewing images in a new tab was an improvement in the first place, but I think opening them in the background would be especially user-unfriendly. When a user selects “view image”, they expect to see the image. I’ve seen plenty of Chrome users think the feature is broken because they didn’t notice anything happening and didn’t realize that a new tab had opened quietly in the background.

Just my two cents:
I think this behavior should simply obey the 'browser.tabs.loadInBackground' preference, rather than unconditionally loading in the foreground.

P.S.: Sorry, I should have said this in my last comment.

I think "what the user would expect" is for opening a link in a new tab to behave the same as opening an image in a new tab.

If the user isn't aware that an about:config preference controlling this exists, then they obviously would expect the behavior when opening a link or opening an image to be whatever Firefox defaults to doing.

But if the user is aware that this preference exists, then they obviously have a specific expectation that is being upset if FF behaves differently for links than it does for images.

Therefore, for consistency and in accordance with the principle of least astonishment, it really just should obey the existing preference governing opening new tabs instead of ignoring it and deciding unilaterally.

Wyatt's comment makes sense to me and matches the expectation expressed in bug 1603888. I also agree with Meridel.

See Also: → 1603888

+1 for Wyatt's suggestion. browser.tabs.loadInBackground is by default set to true. This, as well as being consistent with Chrome's behaviour, would suggest to me that the average user would expect images to open in a background tab by default.

if this change does get implemented in some or another (my personal feeling is with Wyatt's suggest to honor browser.tabs.loadInBackground), the same change should be applied to "Open Video in New Tab" as well.

Besides consistency with "Open Link In New Tab," at least for me just on its own the current behavior is unwelcome and frustrating. Usually when I want to open an image in a new tab, I am trying to open many images on the page in quick succession. With the current behavior, this requires many extra clicks to swap back to the original tab after opening each image.

(In reply to Aaron Nowack from comment #8)

Besides consistency with "Open Link In New Tab," at least for me just on its own the current behavior is unwelcome and frustrating. Usually when I want to open an image in a new tab, I am trying to open many images on the page in quick succession. With the current behavior, this requires many extra clicks to swap back to the original tab after opening each image.

Thoroughly agree - when I visit a page looking to open an image in a new tab, it's usually one of many, thus prefer opening in the background.

The only time I'd want the image to be immediately focused is when I visited the page for that image, specifically, in which case I wouldn't want it to open a new tab at all - I'd want that image to replace the page I have currently open to begin with (the common workflow that got bricked in Firefox 88).

See my suggestion on how to address this at https://bugzilla.mozilla.org/show_bug.cgi?id=1699128#c76

I'm prepared to work on this. I just recently implemented the same functionality for the "Search <Engine> for <String> context menu option" (https://bugzilla.mozilla.org/show_bug.cgi?id=360332).

Whiteboard: [proton-context-menus][parity-chrome] [priority:2b] → [proton-context-menus][parity-chrome] [priority:2a]
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/3ef9ef49563a honour browser.tabs.loadInBackground for 'Open Image/Video/Audio in New Tab', r=mconley,fluent-reviewers,flod

Backed out changeset 3ef9ef49563a (Bug 1706487) for causing bc failures in browser_bug734076.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/e4b211990eb02fb6afc92bb94184160dd3d85a6a
Push with failures. failure logs 1, 2.

Flags: needinfo?(gijskruitbosch+bugs)

Hrmpf, tests that assume that the image tab ends up selected - and we all know what they say about assuming.

I think I fixed the 2 from comment 13, and this is apparently as green as try gets these days: https://treeherder.mozilla.org/#/jobs?repo=try&revision=49f922748834c3d222e6d05d6d221ca2b5b586a5

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ddd0f5c91d73 honour browser.tabs.loadInBackground for 'Open Image/Video/Audio in New Tab', r=mconley,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

Verified that using latest Nightly build (90.0a1) Open Image/video in New Tab will now open the media in a background new tab. Testing was done on all platforms (macOS 11.3, Windows 10 and Ubuntu 18.04).

Status: RESOLVED → VERIFIED

Is this worth calling out in firefox 90 release notes? (If yes, see https://wiki.mozilla.org/Release_Management/Release_Notes#Nomination_in_Bugzilla)

Flags: needinfo?(gijskruitbosch+bugs)

Release Note Request (optional, but appreciated)
[Why is this notable]: Changes both default behaviour of the item and shortcut use (ctrl+ / ctrl_shift+) of it
[Affects Firefox for Android]: No
[Suggested wording]: The "Open Image in New Tab" context menu item now opens the image in a background tab by default. This can be configured in Firefox's settings.
[Links (documentation, blog post, etc)]: n/a

relnote-firefox: --- → ?
Flags: needinfo?(gijskruitbosch+bugs)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: