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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 8 17:42:24 PST 2010


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


Ojan Vafai <ojan at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hyatt at apple.com,
                   |                            |mitz at webkit.org




--- Comment #4 from Ojan Vafai <ojan at chromium.org>  2010-01-08 17:42:23 PST ---
For those following along, this bug is essentially about being able to save a
selection, mess with the DOM and restore the selection in a way that maintains
platform appropriate directionality.

http://trac.webkit.org/changeset/45945 caused the regression. The problem here
is that on the Mac the first time you hit shift+left/right decides which end of
the selection is the anchor/focus. That state is stored in
m_lastChangeWasHorizontalExtension, which is not exposed to JS in any way.

That this happens on all platforms is a bug. I have an unfinished patch that
makes this only happen on the Mac. But still, for this to work on the Mac, we'd
need to expose something to JS. Something like isDirectionalityFinal. On
non-Mac platforms, that would always return true. Then, setBaseAndExtent should
take an optional fifth argument that is the value of this boolean and it would
set m_lastChangeWasHorizontalExtension accordingly.

Not sure who the arbiters of adding to DOMSelection.idl are. Hyatt, Mitz you
have thoughts? It's a bit weird to me to expose platform-specific features of
selections to the web, but I don't really see an alternative.

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