Open Bug 1446675 Opened 7 years ago Updated 2 years ago

Wonky text selection with HTML5 details elements

Categories

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

59 Branch
Unspecified
All
defect

Tracking

()

People

(Reporter: bram.speeckaert, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Attached file Reduced test case
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180315233128 Steps to reproduce: 1. Open the reduced test case (based on https://github.com/dolphin-emu/dolphin/pull/6409#issue-171770372). 2. Try to select text with the mouse in such a way that you start inside text preceding a 'details' element and end somewhere after that 'details' element. I usually click somewhere inside the first line, then move the mouse cursor downwards quickly while still holding the left mouse button, then let go towards the bottom. 3. Cancel your previous selection by clicking elsewhere inside the page once. Actual results: Selection may become 'absorbed' by the details element once I'm past the first details element. Upon cancelling the selection, part of the selection may remain visible as blue highlighted text. Despite the visual glitch, the selection is still logically cancelled (as evidenced by the missing 'Copy' option in the context menu, which should be present in case of an active selection). Forcing Firefox to (partially) redraw (for example, by selecting the affected text or switching tabs) will fix the incorrect highlight. Expected results: Under no circumstances should elements that are no longer selected remain highlighted. Text selection involving 'details' elements is handled much more naturally in other browsers (Chrome, Safari).
I canalso reproduce the issue on Nightly61.0a1 Windows10 64bit.
Component: Untriaged → Selection
OS: Unspecified → All
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
[Triage 2018/03/23 - P3]
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: