Closed Bug 1990203 Opened 8 months ago Closed 3 months ago

www.reddit.com - Copying a comment along with the user name copies the whole comment thread content

Categories

(Web Compatibility :: Site Reports, defect, P3)

Desktop
Windows 10

Tracking

(Webcompat Priority:P2, Webcompat Score:6, firefox-esr115 unaffected, firefox-esr140 unaffected, firefox143 wontfix, firefox144 wontfix, firefox145 wontfix, firefox146 wontfix, firefox149 fixed)

RESOLVED FIXED
Webcompat Priority P2
Webcompat Score 6
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox143 --- wontfix
firefox144 --- wontfix
firefox145 --- wontfix
firefox146 --- wontfix
firefox149 --- fixed

People

(Reporter: rbucata, Unassigned)

References

(Regression, )

Details

(Keywords: regression, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan])

User Story

platform:windows,mac,linux
impact:annoyance
configuration:general
affects:all
branch:release
diagnosis-team:dom
user-impact-score:300

Attachments

(1 file)

Environment:
Operating system: Windows 10
Firefox version: Firefox 145.0

Steps to reproduce:

  1. Navigate to: https://www.reddit.com/r/roFrugal/comments/1nobyrl/donez_pizza_dodo/
  2. Copy a comment that has replies and its user name
  3. Paste anywhere and observe

Expected Behavior:
The title and comment made are copied

Actual Behavior:
The whole content of the comment thread is copied (usernames, replies, timestamp, etc)

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/178884

Attached video Chr vs FF

Copying anything else other than this combination works. For example, copying just the comment pastes as expected.

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan]

It doesn't do that for me on macOS, so maybe this is somehow oddly related to the Windows selection thing? But James could also see something odd on Linux, so maybe not.

Severity: -- → S4
User Story: (updated)
Webcompat Priority: --- → P2
Webcompat Score: --- → 6
Priority: -- → P2
User Story: (updated)

Hmm, can reproduce on Fedora.

User Story: (updated)

dom.shadowdom.selection_across_boundary.enabled=false fixes it.

Keywords: regression
Regressed by: 1903870

Each comment is composed of a custom element <shreddit-comment>, which has slot=commentMeta for nickname/timestamp and slot=comment for the comment body. Crossing the slot boundary seems to incorrectly copy the whole element (which includes subcomments as its children)

Set release status flags based on info from the regressing bug 1903870

:sefeng211, since you are the author of the regressor, bug 1903870, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(sean)
Component: Site Reports → DOM: Core & HTML
Product: Web Compatibility → Core

https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots#result causes the same issue, crossing the boundary between each details element unexpectedly causes full copy of both.

Hey Olli, adding this to your radar.

Flags: needinfo?(sean) → needinfo?(smaug)
Severity: S4 → --
Priority: P2 → --

Set release status flags based on info from the regressing bug 1903870

This could also be related to the serializer, where the nsHTMLCopySelector "promotes" the selection range for serialization.

See Also: → 1994763

It is not about the range promotion, but the way we compute the flatten tree ancestors and offsets for serializing seems wrong, https://searchfox.org/firefox-main/rev/b67c6262ecbe7d4c9385a1bd335fd7dd1d3f887d/dom/serializers/nsDocumentEncoder.cpp#1415-1420. I think the root cause is the same as bug 1994763.

Severity: -- → S3
Component: DOM: Core & HTML → DOM: Serializers
Depends on: 1994763
Flags: needinfo?(smaug)
Priority: -- → P3
See Also: 1994763

I have verified on today's nightly (2026-01-30), it is fixed now.

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Component: DOM: Serializers → Site Reports
Product: Core → Web Compatibility
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: