Open Bug 1732599 Opened 4 years ago Updated 3 years ago

First word of a shadow DOM with slots is not selectable by double-clicking

Categories

(Core :: DOM: Selection, defect, P2)

Firefox 94
Unspecified
All
defect

Tracking

()

Webcompat Priority P3
Tracking Status
firefox92 --- affected
firefox93 --- affected
firefox94 --- affected
firefox99 --- affected

People

(Reporter: karlcow, Unassigned)

References

(Blocks 1 open bug, )

Details

  1. Go to https://mrotherguy.github.io/fx-nightly-changelog/
  2. Select a day with the date picker to make sure to have content.
  3. A table appears
  4. Go to the first word of the description (after bug number and category)
  5. Double click on the first word

Expected:
Word is being selected

Actual
Word is not selected

  1. Head to the second word
  2. Double click

Actual:
Word is being selected.

When double-clicking the first word, the Selection is the following:

Selection { anchorNode: #text, anchorOffset: 12, focusNode: #text, focusOffset: 12, isCollapsed: true, rangeCount: 1

That is, a collapsed range after the first word is selected.

Changing severity to S2 because major functionality is affected.

Severity: -- → S2
Priority: -- → P2

Change the status for beta to have the same as nightly and release.
For more information, please visit auto_nag documentation.

QA Whiteboard: [qa-regression-triage]
Webcompat Priority: P3 → ?
Webcompat Priority: ? → P3

I was able to reproduce the issue using Nightly from 3July 2018, older build than this do not load the change log page (https://mrotherguy.github.io/fx-nightly-changelog/).

Does this really impact "every" first word in "every" Shadow DOM? The next step here would be to come up with a minimized test case to understand better how widely this impacts Shadow DOM.

Minimal example with custom elements:
https://jsfiddle.net/k3Lv748s/1/
The <a> element is necessary.

When using a pure shadow DOM with a template with one slot, none of the words are selected:
https://jsfiddle.net/rscjfz3y/1/

When we fix this, both scenarios require testing.

Flags: needinfo?(mbrodesser)
Summary: First word of a shadow DOM text is not selectable → First word of a shadow DOM with slots is not selectable
Summary: First word of a shadow DOM with slots is not selectable → First word of a shadow DOM with slots is not selectable by double-clicking

It's not ideal that double-clicking doesn't work for certain scenarios. We thought S3 is reasonable - given that the word is still selectable by dragging.

Severity: S2 → S3
You need to log in before you can comment on or make changes to this bug.