Closed Bug 1731626 Opened 4 years ago Closed 1 year ago

When right clicking a link and selecting open in new window or open in new tab from the context menu, the browser back button is enabled in the newly opened window.

Categories

(Core :: DOM: Navigation, defect, P3)

Firefox 91
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox92 --- wontfix
firefox93 --- wontfix
firefox94 --- wontfix
firefox132 --- verified

People

(Reporter: tom.fitts, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36

Steps to reproduce:

Go to any webpage, right click a link and select open in new tab or open in new window from the context menu. The browser back button is enabled on the new window. The new window should be clear of any browser history.

Actual results:

The browser back button is enabled.

Expected results:

The browser back button should be disabled.

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
20210903235534

Can't reproduce this. In fact, what you're describing is a feature request filed in 1999, bug 18808.

Update to the latest version, disable all add-ons, and check if it still happens.

Component: Untriaged → DOM: Navigation
Product: Firefox → Core

You are correct, it does not happen with every link. To clarify the issue, when performing the above mentioned actions on certain links the browser back button is enabled on the new browser window even though it serves no purpose. i.e. There is nothing to browser back to.

This can be reproduced on the FireFox website:

https://www.mozilla.org/en-US/firefox/new/?redirect_source=firefox-com

Once on the page, right click on the All Languages link in the upper right corner. Select "Open Link in New Window" or "Open Link in New Tab".

Notice on the new browser window the browser back button is enabled, but there is nothing to browser back to. i.e. Click browser back and you just remain on the same page.

In this scenario the browser back button should be disabled when the new browser window opens.

(In reply to tom.fitts from comment #2)

This can be reproduced on the FireFox website:

https://www.mozilla.org/en-US/firefox/new/?redirect_source=firefox-com

Once on the page, right click on the All Languages link in the upper right corner. Select "Open Link in New Window" or "Open Link in New Tab".

Thanks. I can reproduce the bug with these steps.

The problem is that this page's "All Languages" link (https://www.mozilla.org/en-US/firefox/all/#product-desktop-release) links to an anchor #product-desktop-release. Firefox loads the page https://www.mozilla.org/en-US/firefox/all/ and then auto-navigates to the anchor. So pressing the Back button navigates from the #product-desktop-release anchor back to the top-level page https://www.mozilla.org/en-US/firefox/all/.

The Back button intervention (meta bug 1645211) to only add pages to session history that the user has interacted with would fix this, but we could fix this on its own.

Blocks: 1645211
Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
No longer blocks: 1645211
Depends on: 1645211
Attachment #9386831 - Attachment is obsolete: true

The back button intervention has been shipped with bug 1734181, and I am no longer able to reproduce this behaviour.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

This looks fixed to me on the Latest Nightly build 132.0a1 across platforms (Windows 11, macOS 13 and Ubuntu 22.04) using different websites as bugzilla.mozilla.org or fundogstudios.com since the one from comment 2 and comment 3 are not a thing anymore. The back and forward button are disabled for websites that have anchors.

Status: RESOLVED → VERIFIED

Verified as fixed on Android as well, on the latest Nightly 132.0a1 with Samsung Galaxy S23 Ultra (Android 14).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: