Bug 196480

Summary: Shift-arrow keys select in the wrong direction in an RTL input
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, dbates, mitz, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186465
Attachments:
Description Flags
Testcase none

Description Simon Fraser (smfr) 2019-04-01 20:34:26 PDT
Created attachment 366465 [details]
Testcase

Load the attachment, type a bunch of text into the input, and then arrow around: the caret moves in the direction you expect. Now shift-arrow: the selection is extended in the wrong direction.

This works in Firefox.
Comment 1 Radar WebKit Bug Importer 2019-04-01 20:36:33 PDT
<rdar://problem/49507135>
Comment 2 Ryosuke Niwa 2019-04-01 21:59:59 PDT
Yeah, the selection is always extended in logical direction.
Comment 3 Simon Fraser (smfr) 2019-04-02 10:18:50 PDT
That's really odd when arrow keys move the caret in the physical direction.
Comment 4 Ryosuke Niwa 2019-04-02 14:14:59 PDT
(In reply to Simon Fraser (smfr) from comment #3)
> That's really odd when arrow keys move the caret in the physical direction.

To support extending / shirnking selection in visual direction, we need to support multi-range selection or weird stuff happens.
Comment 5 Ahmad Saleem 2023-02-06 13:00:25 PST
I am able to reproduce this in WebKit ToT (259906@main) and it matches with Chrome Canary 112 while Firefox Nightly 111 show caret in the end of the text and also Shift+Arrow keys also behave opposite of Safari & Chrome.