WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
9456
REGRESSION (417.9.2-420+): Cmd-G doesn't work in Safari after double-click and Cmd-E
https://bugs.webkit.org/show_bug.cgi?id=9456
Summary
REGRESSION (417.9.2-420+): Cmd-G doesn't work in Safari after double-click an...
John Sullivan
Reported
2006-06-15 10:52:04 PDT
This bug is also in Radar as <
rdar://4587986
> To reproduce: 1. Visit any page that contains a word that occurs more than once, e.g.
http://www.amazon.com
2. Double-click such a word (e.g. "the") 3. Cmd-E to put the word on the Find pasteboard 4. Cmd-G to select and reveal the next occurrence The next occurrence isn't found; the selection remains on the word double-clicked in step 1. Note that dragging across the word instead of double-clicking it does not cause this bug to occur, so there's something special about double-clicking here. Also note that if you click outside of the selection after step 3, then Cmd-G will correctly cycle around all occurrences of the word including the first one. So it seems that the text put on the Find pasteboard is correct. -------------------------------------------
Attachments
patch
(6.57 KB, patch)
2006-06-15 12:15 PDT
,
Justin Garcia
justin.garcia
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
John Sullivan
Comment 1
2006-06-15 11:07:17 PDT
The problem is in Frame::findString() -- there's a test to see whether the result range after calling findPlainText() matches the current selection. If so, the code looks for the next occurrence. But when this bug occurs, the code thinks the result range does not match the selection, so the already-selected text is left selected. This code has not changed recently, and I'm pretty sure that this bug is pretty new. So it seems that the problem is that the Selection computed after double-clicking a word no longer matches the Selection computed after (e.g.) dragging across the same word. Maybe the definition of the "=" operator changed for Selection? Maybe double-clicking is now making the Selection object different in some way than it used to?
John Sullivan
Comment 2
2006-06-15 11:13:43 PDT
I was wrong -- this code has actually changed recently: 2006-06-09 Justin Garcia <
justin.garcia@apple.com
> Reviewed by levi <
rdar://problem/4549980
> REGRESSION: "Find Again" can get stuck when searching for string with a trailing space <...> * page/Frame.cpp: (WebCore::Frame::findString): Moved from FrameMac. Compare a selection created using the found range with the current selection in case the current selection is the found range minus some collapsed whitespace on the edges. I strongly suspect that this change was the cause of this regression. I'm reassigning to Justin since he knows this Selection stuff well and he made that recent change.
Justin Garcia
Comment 3
2006-06-15 12:15:28 PDT
Created
attachment 8860
[details]
patch
Justin Garcia
Comment 4
2006-06-15 12:56:38 PDT
Comment on
attachment 8860
[details]
patch dave reviewed this
David Harrison
Comment 5
2006-06-15 12:56:39 PDT
Comment on
attachment 8860
[details]
patch r=me
Justin Garcia
Comment 6
2006-06-15 13:01:44 PDT
r14877
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug