Summary: | Spelling suggestions in the context menu don't call the should* delegate methods | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Duncan Wilcox <duncan> | ||||||||
Component: | HTML Editing | Assignee: | Dave Hyatt <hyatt> | ||||||||
Status: | VERIFIED FIXED | ||||||||||
Severity: | Normal | ||||||||||
Priority: | P2 | ||||||||||
Version: | 412 | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.4 | ||||||||||
Attachments: |
|
Description
Duncan Wilcox
2005-06-14 14:47:56 PDT
Created attachment 2339 [details]
Fixes the problem
I'd like to know if this is a real problem? Could you attach a testcase? Created attachment 2355 [details]
testcase
I suppose that it doesn't make any difference at all if you are using the
default editing delegate, however it certainly is a violation of the editing
delegate protocol.
The editing delegate is allowed to return a NO/FALSE to
webView:shouldInsertText:replacingDOMRange:givenAction:, for example try
building the attached testcase (create an empty project in xcode and replace
main.m with this code) and typing "three".
The editing delegate replaces all "e"s with "i"s, so you will see "thrii". The
contextual menu will propose "three", and when you select it you will
incorrectly get "three", because the webkit isn't going through the delegate
correctly. With the patch applied you will get "thrii" instead, which is weird
but is correct :)
Yes, this is a real editing bug. We have lots of cases where we're not calling the editing delegates, and we should be doing that consistently in all cases. It's hard to make test cases for these things -- we'd need to enhance DumpRenderTree to dump when the editing delegate is called at the very least. Created attachment 2626 [details]
Patch and ChangeLog entry
Comment on attachment 2626 [details]
Patch and ChangeLog entry
r=me
Reporter, please mark this bug as verified if it has been fixed for you. |