Closed
Bug 459921
Opened 16 years ago
Closed 16 years ago
Double-click-and-drag selects previous word when dragging to left half of first letter of a word
Categories
(Core :: DOM: Selection, defect)
Core
DOM: Selection
Tracking
()
VERIFIED
FIXED
mozilla1.9.1b2
People
(Reporter: uriber, Assigned: uriber)
References
(Depends on 1 open bug)
Details
(Keywords: testcase)
Attachments
(3 files, 2 obsolete files)
379 bytes,
text/html
|
Details | |
1.35 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
2.32 KB,
patch
|
Details | Diff | Splinter Review |
When dragging after double-click (selecting in word-by-word mode), if you drag to the first (left) half of the first letter of a word, the previous word gets selected as well. This is similar to bug 200098, and should be fixable in a similar manner.
Assignee | ||
Comment 1•16 years ago
|
||
Comment 2•16 years ago
|
||
Note: Keep the mouse down after you double-click on "Web" in the testcase.
OS: Mac OS X → All
Hardware: PC → All
Assignee | ||
Comment 3•16 years ago
|
||
Similar to bug 200098.
Comment on attachment 343828 [details] [diff] [review] patch we really need tests for this stuff
Attachment #343828 -
Flags: superreview+
Attachment #343828 -
Flags: review?(roc)
Attachment #343828 -
Flags: review+
Assignee | ||
Comment 5•16 years ago
|
||
I'll wait until someone verifies that my test for bug 415707 works on Windows/Linux before checking this in (unless someone wants to verify this test, which would be nice).
Assignee | ||
Updated•16 years ago
|
Attachment #343983 -
Flags: review?(roc)
Assignee | ||
Comment 6•16 years ago
|
||
Comment on attachment 343983 [details] [diff] [review] mochitest Actually, Roc, would you like to have a look at the test first?
Using synthesizeMouse would take care of the accelerator-key selection and getBoundingClientRect for you. Otherwise looks good.
That's in EventUtils.js
Assignee | ||
Comment 9•16 years ago
|
||
Using EventUtils.js, much nicer.
Attachment #343983 -
Attachment is obsolete: true
Attachment #343983 -
Flags: review?(roc)
Assignee | ||
Comment 10•16 years ago
|
||
The real test, this time.
Attachment #344046 -
Attachment is obsolete: true
Assignee | ||
Comment 11•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/edd4e55b65fe
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
Assignee | ||
Comment 12•16 years ago
|
||
I backed out the mochitest since it triggered bug 426195, and the workaround we used last time (do another click at the end) only fixed Mac, and broke a different test on Linux (that wasn't affected initially).
Depends on: 426195
Flags: in-testsuite+ → in-testsuite?
> nsIFrame* frame = GetFrameForNodeOffset(offsets.content, offsets.offset, HINTRIGHT, &offset); >+ >+ if (amount == eSelectWord && direction == eDirPrevious) { >+ // To avoid selecting the previous word when at start of word, >+ // first move one character forward. >+ nsPeekOffsetStruct charPos; >+ charPos.SetData(eSelectCharacter, eDirNext, offset, 0, >+ PR_FALSE, mLimiter != nsnull, PR_FALSE, PR_FALSE); >+ if (NS_SUCCEEDED(frame->PeekOffset(&charPos))) { ^ frame should be null checked here (or perhaps in the if() block above), like it is when it's used below. >+ frame = charPos.mResultFrame; >+ offset = charPos.mContentOffset; >+ } >+ } I think this is causing my crash at http://crash-stats.mozilla.com/report/index/a795e040-a45f-11dd-b7a9-001cc4e2bf68?p=1 -- caused by selecting and deselecting some stuff on a bugzilla bug list page.
Depends on: 461813
Comment 14•15 years ago
|
||
verified FIXED on builds: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090413 Minefield/3.6a1pre ID:20090413031052 and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090413 Minefield/3.6a1pre ID:20090413031052
Status: RESOLVED → VERIFIED
Comment 15•15 years ago
|
||
ack, here's the build ID for Shiretoko Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090413 Shiretoko/3.5b4pre ID:20090413031313
You need to log in
before you can comment on or make changes to this bug.
Description
•