Bug 14347 - REGRESSION (r21291): Initiating a drag near the edge of a selection deselects it
Summary: REGRESSION (r21291): Initiating a drag near the edge of a selection deselects it
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2007-06-23 15:52 PDT by mitz
Modified: 2007-08-09 21:01 PDT (History)
2 users (show)

See Also:


Attachments
Patch (38.46 KB, patch)
2007-08-09 00:44 PDT, mitz
justin.garcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2007-06-23 15:52:59 PDT
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.
Comment 1 mitz 2007-06-23 22:45:08 PDT
Looks like this regressed in <http://trac.webkit.org/projects/webkit/changeset/21291> (fix for <rdar://problem/4895428>).
Comment 2 Andrew Wellington 2007-06-24 05:47:31 PDT
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?
Comment 3 Justin Garcia 2007-06-24 19:54:21 PDT
> 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.
Comment 4 mitz 2007-08-09 00:44:11 PDT
Created attachment 15877 [details]
Patch
Comment 5 Mark Rowe (bdash) 2007-08-09 20:58:57 PDT
<rdar://problem/5400592>
Comment 6 Mark Rowe (bdash) 2007-08-09 21:01:01 PDT
Landed in r24974.