layout.word_select.stop_at_punctuation does not respect punctuation on the right of the word
Categories
(Core :: DOM: Selection, defect, P5)
Tracking
()
People
(Reporter: hi, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
Type .Hello. .World.
On Mac, press "option+right arrow" and "option+left arrow".
Actual results:
Cursor does not stop before the punctuation when going right but it does when going left.
Expected results:
Cursor stops before the punctuation when going both right and left.
Comment 1•3 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
AFAIK the relevant code is in nsIFrame, so maybe still Layout? Or should the code be moved elsewhere? 🤔
Comment 3•3 years ago
|
||
I mean, we can put the bug back in layout if you want, but I think this is more selection-related...
Comment 4•3 years ago
•
|
||
Yeah, I mean, I think currently DOM: Selection is a mishmash of DOM Selection API bugs and layout text selection bugs. This should probably be discussed separately though.
Edit: Maybe the DOM: prefix can be removed as there aren't too many Selection API-specific bugs?
Comment 5•3 years ago
|
||
Anyway, it seems this is done intentionally per the comment:
keyboard caret movement only stops after punctuation (in content order)
So the case in comma,separated,words
, it only stops before s
, not before ,
. Initially it stopped before a comma but changed in Bug 392809 as the previous behavior was considered as a regression.
Since the flag is on by default on all platforms, I'm a bit hesitant to fix the behavior. I wonder what others think.
Updated•3 years ago
|
Description
•