[ contenteditable ] In anchors I can't select one word with double click
Categories
(Core :: DOM: Selection, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: andrei.draganescu, Assigned: saschanaz)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
- Open a page that uses TinyMCE or another contenteditable text editor
(e.g. WordPress' classic or Gutenberg editors) - Add a 5 word sentence (Pharetra Fusce Bibendum Mollis Cursus)
- Select 3 words and make them an anchor by formatting as Link
- Deselect the words
- Try to select one of the linked words with double click
Actual results:
- The whole link is selected
Expected results:
- Only the double clicked word should be selected
Hi andrei.draganescu,
Thank you for your report.
Could you please attach a test page where we can try to reproduce and verify this issue?
Please also let us know if you see it reproducing on the latest Firefox Nightly version, you can download it from here: https://nightly.mozilla.org/
Thanks!
Virginia
Comment 2•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 3•5 years ago
|
||
Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is --
(non,) indicating it has has not been previously triaged, the bug's Severity is being updated to --
(default, untriaged.)
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Element::PostHandleEventForLinks
always marks MouseEvent as nsEventStatus_eConsumeNoDefault
after the first click event, so the second one is ignored by nsIFrame::HandlePress
and thus not handled by nsIFrame::PeekOffset
.
Assignee | ||
Comment 6•4 years ago
|
||
Oh, turns out this behavior is intended to be a feature. HTMLEditorEventListener::MouseDown
intentionally detects an anchor and selects the whole element.
Now the question is whether we want to keep the behavior or not. I think it makes sense, as selecting a whole anchor helps when a user wants to edit its href
. Masayuki, thoughts?
Assignee | ||
Comment 7•4 years ago
|
||
Also, andrei.draganescu, have you seen any web incompatibility due to this Firefox behavior?
Comment 8•4 years ago
|
||
Yeah, our editor makes sence if user wants to update the link information including unlink it. On the other hand, if user wants to modify the text in a link, our editor behavior looks like inconsistent. If we could have both features with modifier steate difference, it might be better.
Assignee | ||
Comment 9•4 years ago
|
||
Any modifier in mind? A triple click might also make sense, not sure.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
I think a triple click does make sense as it's intention is "select all in this paragraph", which can naturally translate in this case to "select all in this anchor". Workarounding is also easier in a triple click case as a user can just do it outside of an anchor.
Assignee | ||
Comment 11•4 years ago
|
||
Assignee | ||
Comment 12•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 13•4 years ago
|
||
Depends on D77812
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/da4122fa9fd1
https://hg.mozilla.org/mozilla-central/rev/67d197b2b8d2
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
bugherder |
Reporter | ||
Comment 18•4 years ago
|
||
Thank you everyone participating here! You are all awesome :)
Description
•