Closed Bug 2005471 Opened 3 months ago Closed 3 months ago

Going back from a Reddit image preview skips 1 page with Navigation API enabled

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

VERIFIED FIXED
148 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox146 --- disabled
firefox147 + verified
firefox148 + verified

People

(Reporter: Fanolian+BMO, Assigned: farre)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: nightly-community, regression, reproducible)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Build ID: 20251210095635

Steps to reproduce

  1. Enable Navigation API on Nightly.
  2. Go to any page to create a dummy tab history. E.g. https://www.firefox.com/en-US/.
  3. In the same tab, go to any Reddit page with an image that can be clicked to preview. E.g. https://www.reddit.com/r/aww/hot/ (P.S. not old.reddit.com version)
  4. Left-click an image to pop up a preview lightbox.
  5. With the preview still opened, go back 1 page.
  6. [Optional] Go forward 1 page.

Actual result

The tab goes back to https://www.firefox.com/en-US/, not https://www.reddit.com/r/aww/hot/.
Navigating forward at step 6 brings me back to https://www.reddit.com/r/aww/hot/.

Expected result

The tab should go back to https://www.reddit.com/r/aww/hot/ at step 5.

Additional notes

Clicking the cross button on the top right corner of the lightbox brings me back to https://www.reddit.com/r/aww/hot/ as expected.

If there is no previous histories on the tab, i.e. open a new tab -> go to reddit to click on an image -> click back, the tab goes back to https://www.reddit.com/r/aww/hot/ as expected.

Workaround

Set dom.navigation.webidl.enabled to false.

Regression

Last good Nightly: 2025-10-31
First bad Nightly: 2025-11-01
pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=90470f1361431a99abb4526828c12b7adc2296cb&tochange=3befa2ffc228fd4d071c8b696872a760954392fc

Bisecting autoland builds:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=90470f1361431a99abb4526828c12b7adc2296cb&tochange=86a3463c7d95316b2905a2d45caa3a14d843a5a5

This is regressed by bug 1979288.

Flags: needinfo?(afarre)

If there is no previous histories on the tab, i.e. open a new tab -> go to reddit to click on an image -> click back, the tab goes back to https://www.reddit.com/r/aww/hot/ as expected.

Please disregard this part. The bug still exhibits with the steps above. I forgot to turn Navigation API back on.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Hi Fanolian, is this still reproducing for you with current Nightly builds? We've landed some fixes that were supposed to address Reddit navigation issues.

Flags: needinfo?(Fanolian+BMO)

Not this one though. We have a patch, :farre will post it tomorrow.

Flags: needinfo?(Fanolian+BMO)
Assignee: nobody → afarre
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/56813 for changes under testing/web-platform/tests
Flags: in-testsuite+
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Upstream PR merged by moz-wptsync-bot

Please nominate this Beta uplift when you get a chance.

Attachment #9533965 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Reddit #lightbox (image preview) is broken
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: * Go to reddit.com/aww/hot
  • Click an image to get the preview
  • Press back (in UI)
  • Verify that we return to reddit.com/aww/hot
  • Risk associated with taking this patch: low
  • Explanation of risk level: Small and contained change
  • String changes made/needed: None
  • Is Android affected?: yes
Flags: qe-verify+

(In reply to Ryan VanderMeulen [:RyanVM] from comment #9)

Please nominate this Beta uplift when you get a chance.

Done, thanks for the poke. Wanted it to simmer at least a full day on central.

Flags: needinfo?(afarre)
Attachment #9533965 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift][qa-ver-needed-c148/b147]
QA Contact: cgeorgiu

I reproduced this issue on Win 11 using an affected Nightly build (2025-12-11) following the STR from comment 0.

The issue is verified as fixed on latest Beta 147.0b7 (build downloaded from treeherder) and Nightly 148.0a1 under Win 11, macOS 26.1 and Ubuntu 24.

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c148/b147] → [uplift][qa-ver-done-c148/b147]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: