[Webkit-unassigned] [Bug 36542] shift+click on an existing selection doesn't work right
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 5 15:50:05 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36542
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #55160|review? |review+
Flag| |
--- Comment #2 from Darin Adler <darin at apple.com> 2010-05-05 15:50:05 PST ---
(From update of attachment 55160)
> + // See <rdar://problem/3668157> REGRESSION (Mail): shift-click deselects when selection
> + // was created right-to-left
> + Position start = newSelection.start();
> + Position end = newSelection.end();
> + int distanceToStart = textDistance(start, pos);
> + int distanceToEnd = textDistance(pos, end);
> + if (distanceToStart < distanceToEnd)
> + newSelection = VisibleSelection(pos, end);
> + else
> + newSelection = VisibleSelection(start, pos);
Thanks for working so hard to get the Mac behavior. But I suspect this is still
not quite right. I think it's important that the end that moved due to the
click is the "extent", so that shift-arrow keys modify that side of the
selection. I believe that means we should have VisibleSelection(end, pos)
rather than VisibleSelection(pos, end).
I'd like to see a test case that covers that part of the behavior as well. I'm
going to say r=me on this as-is, but I hope you go the extra mile and make the
refinement I mention above.
--
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