Closed Bug 1955664 Opened 5 months ago Closed 16 days ago

`Open In New Tab` doesn't scroll for text fragments

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

VERIFIED FIXED
143 Branch
Tracking Status
firefox143 --- verified
firefox144 --- verified

People

(Reporter: sefeng211, Assigned: jjaschke)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(1 file)

STR:

  1. Open https://github.com/WICG/nav-speculation/issues/368
  2. Right click the source link in the description with Open In New Tab

A new tab is opened, but Firefox doesn't scroll to the highlight. Chrome does scroll though.

This is 20250321040811 build on Linux

Flags: needinfo?(jjaschke)

I can repro. This is only if the link is opened via the context menu, and also occurs for Open in New Window.

about:logging hints that the user involvement check is not working as expected.

Flags: needinfo?(jjaschke)
Severity: -- → S3
OS: Unspecified → All
Hardware: Unspecified → All

Some more context after having a few offline discussions around this:

The immediate reason for not scrolling is that opening a link in a new tab / window first opens about:blank in the new tab/window, then navigates to the link from there. That means that the triggering principal, which is currently used to check for user involvement, is the null principal (instead of the system principal which one would expect, since the action was triggered from the context menu). Also, it seems that there is a difference between CTRL-Click on a link and Context Menu -> Open in a new Tab w.r.t. user activation (going through context menu = no user activation).

In order to fix this, we need to properly implement User Involvement -- which coincidentally we currently do in our Navigation API work (Bug 1777171 as meta).

Duplicate of this bug: 1948187
Component: DOM: Core & HTML → DOM: Navigation
Assignee: nobody → jjaschke
Status: NEW → ASSIGNED
Flags: qe-verify+
Pushed by jjaschke@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5998aa21cd9b https://hg.mozilla.org/integration/autoland/rev/172b4f01ef69 Text Fragments: Propagate user activation correctly when opening a link in a new tab or window. r=Gijs
Regressions: 1983146
Status: ASSIGNED → RESOLVED
Closed: 16 days ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143] [qa-ver-needed-c144/b143]

Reproducible on a 2025-08-12 Firefox Nightly build on Windows 10.

Verified as fixed on Firefox Nightly 144.0a1 and Firefox 143.0b2 on Windows 10, Ubuntu 22, macOS 15.

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

Attachment

General

Created:
Updated:
Size: