[Webkit-unassigned] [Bug 114063] Selection drag tracking code causes selection range to revert to incorrect state

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 5 15:52:04 PDT 2013


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


Nathan Vander Wilt <natevw at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #196677|0                           |1
        is obsolete|                            |
 Attachment #196678|0                           |1
        is obsolete|                            |




--- Comment #2 from Nathan Vander Wilt <natevw at yahoo.com>  2013-04-05 15:50:17 PST ---
Created an attachment (id=196692)
 --> (https://bugs.webkit.org/attachment.cgi?id=196692&action=review)
Example demonstrating how the selection code loses track of drag direction when selection end is adjusted

Okay, forget everything I said about splitText and https://bugs.webkit.org/show_bug.cgi?id=114041 — this bug is COMPLETELY UNRELATED and can be be isolated *much* more simply.


Steps to reproduce:
1. Change the selection range *end* while the user is using the mouse to select text.
2. On the next mouse movement, the end of the selection is forced back to the current mouse position, even if the drag direction was backwards!

I haven't fully untangled this web of code, but it appears to all center around http://trac.webkit.org/browser/trunk/Source/WebCore/page/EventHandler.cpp#L834 — the logic there doesn't *seem* to be affected by http://trac.webkit.org/browser/trunk/Source/WebCore/page/DOMSelection.cpp#L385 but I must be somewhat wrong on that because clearly changing the range programmatically resets whatever state the drag code was using to know that the selection *start* was being dragged instead of its *end*.

See the attached example, from JavaScript the start of the selection can be reliably adjusted but if the end of the selection is adjusted the selection gets collapsed underneath the mouse.

-- 
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