[Webkit-unassigned] [Bug 32605] New: Regression: Selection anchor + focus swap when arrow keys after setBaseAndExtent

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 16 03:01:28 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32605

           Summary: Regression: Selection anchor + focus swap when arrow
                    keys after setBaseAndExtent
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
               URL: http://www.danilatos.com/event-test/webkit-sel-bug.htm
                    l
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P1
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: daniel.danilatos at gmail.com
                CC: ojan at chromium.org


The following code (setting the selection base and extent to itself) should be
a no-op:

      var selection = window.getSelection();
      selection.setBaseAndExtent(
          selection.anchorNode, selection.anchorOffset,
          selection.focusNode, selection.focusOffset);

However, if there is a ranged selection, and this code is executed, then
holding shift and using the left or right arrow keys, after having run that
code, causes the focus to switch to the side that would cause the selection
always to expand, rather than preserving the current focus.

STEPS TO REPRODUCE:
1. Go to the demo URL
2. Click on the text in the contentEditable area
3. Hold down shift, and press the left and right arrow keys in different
combinations.

EXPECTED BEHAVIOUR:
One end of the selection stays fixed. The other end moves under the command of
the arrow keys.

OBSERVED BEHAVIOUR:
The selection continually expands in both directions


This regression appears somewhere between webkit nightlies r42162 and r49550
(Those were the two I had lying around, I haven't done a proper binary search).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list