Clicking and holding in the leftmost or rightmost half-letter of a selection deselects it instead of letting the user drag the selected text. To reproduce: 1) Double-click the word WebKit at the top of this page 2) Click and hold for a second in the left hand side of the W 3) Move the mouse while still holding down the mouse button Expected: To be able to drag the selected word. Actual: The word was deselected as soon as the left hand side of the W was clicked. Regression: This is a regression from the Safari 3 beta. Notes: A single-letter selection cannot be dragged at all.
Looks like this regressed in <http://trac.webkit.org/projects/webkit/changeset/21291> (fix for <rdar://problem/4895428>).
In the code added in r21291 there is the comment: // A selection doesn't contain it's endpoints. If you modify the code so that a selection does include the endpoints (modify line 1106 to use <= 0 not < 0) the bug appears to be resolved. This doesn't appear to break any editing layout tests so is there a reason that a selection doesn't contain its endpoints?
> is there a reason that a selection doesn't contain its endpoints? No reason, I just misread the code that I was replacing. That snippet should be removed.
Created attachment 15877 [details] Patch
<rdar://problem/5400592>
Landed in r24974.