Bug 144980

Summary: Option-right-arrow or Option-left-arrow at the last or first word of a line jumps caret one too many words
Product: WebKit Reporter: Susumu Harada <harada>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: d_russell, enrica
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.10   
Attachments:
Description Flags
wrapping text in a div none

Description Susumu Harada 2015-05-13 18:35:27 PDT
Created attachment 253079 [details]
wrapping text in a div

With caret browsing enabled, pressing Option-right arrow at the beginning of the last word in a line that wraps to the next line causes the caret to jump to the end of the first word on the next line, as opposed to the end of the last word on the starting line. The mirror behavior is observed when pressing Option-left arrow at the end of the first word on a line that is wrapping from the previous line.

When Shift key is held down while pressing Option-right arrow or Option-left arrow to create a selection, it behaves correctly.

* STEPS TO REPRODUCE
1. Enable caret browsing and open the attached HTML file.
2. Move the caret to the beginning of the word “long” on the first line.
3. Press Option-right arrow.

* RESULTS
Actual: Caret jumps to the end of the word “sentence” on the following line.
Expected: Caret jumps to the end of the word “long” on the starting line.