Open Bug 1682276 Opened 3 years ago Updated 2 years ago

layout.word_select.stop_at_punctuation does not respect punctuation on the right of the word


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

80 Branch





(Reporter: hi, Unassigned)



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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Layout
Product: Firefox → Core
Component: Layout → DOM: Selection

AFAIK the relevant code is in nsIFrame, so maybe still Layout? Or should the code be moved elsewhere? 🤔

I mean, we can put the bug back in layout if you want, but I think this is more selection-related...

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?

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.

See Also: → 392809
Severity: -- → S4
Priority: -- → P5
See Also: → 1779913
You need to log in before you can comment on or make changes to this bug.