Bug 127078 - Selection bias reversed when setting a range after left key down
Summary: Selection bias reversed when setting a range after left key down
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://jsfiddle.net/3Wpc8/
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 17:55 PST by Ben Davey
Modified: 2018-02-05 13:17 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Davey 2014-01-15 17:55:54 PST
If you try to change the selection between a Shift + Left key down and Left key up event, the selection bias is reversed (i.e. anchorOffset/focusOffset are switched)
This appears to be a bug in webkit derived browsers only, and does not appear to happen on Internet explorer or firefox.

A demonstration can be found at:
http://jsfiddle.net/3Wpc8/

To reproduce the bug:
-open the jsfiddle, and select the word "two". 
- hold shift and press the left arrow key
- observe that the offsets are reversed rather than the expected behavior (..decrementing the focusOffset)
Comment 1 hello@yoavgivati.com 2018-02-05 13:17:58 PST
Is there any plan to fix this?