<rdar://problem/8441042> A reproducible case is typing "doesn'". After typing the apostrophe, the string is corrected into "doesn'does'". This exposes in fact two bugs. 1. After typing "doesn", the correction panel timer is started. If the apostrophe is typed before the time fires, by the time the timer fires, we end up checking spelling on "doesn'" instead of "doesn". The solution is to stop timer whenever the selection changes. 2. If the spelling checking is done for the purpose of bringing up correction bubble, we should suppress any suggestion correction whose range does not end at the last character. In this case, the correction range ends at letter "n" which is the second to the last.This is generally a good policy since it is confusing if we alter other text at the same time we show the correction bubble.
(In reply to comment #0) > <rdar://problem/8441042> > > A reproducible case is typing "doesn'". After typing the apostrophe, the string is corrected into "doesn'does'". This exposes in fact two bugs. > > 1. After typing "doesn", the correction panel timer is started. If the apostrophe is typed before the time fires, by the time the timer fires, we end up checking spelling on "doesn'" instead of "doesn". The solution is to stop timer whenever the selection changes. > > 2. If the spelling checking is done for the purpose of bringing up correction bubble, we should suppress any suggestion correction whose range does not end at the last character. In this case, the correction range ends at letter "n" which is the second to the last.This is generally a good policy since it is confusing if we alter other text at the same time we show the correction bubble. I should point out that fixing bug 1 would prevent bug 2 from manifest. But we should fix them both.
Created attachment 68385 [details] Proposed patch (v1)
Comment on attachment 68385 [details] Proposed patch (v1) View in context: https://bugs.webkit.org/attachment.cgi?id=68385&action=review > WebCore/editing/Editor.h:315 > void startCorrectionPanelTimer(); > + void stopCorrectionPanelTimer(); I don’t think these two methods need to be public. r+ but please upload a new patch making these methods private if possible. If not, set the “cq” flag to ? and I will set to + and the patch will be committed as-is.
Created attachment 68441 [details] Proposed patch (v2) Revised per comment #3. startCorrectionPanelTimer() is used by TypingCommand, so need to stay public. I have made stopCorrectionPanelTimer() private.
Comment on attachment 68441 [details] Proposed patch (v2) Clearing flags on attachment: 68441 Committed r68103: <http://trac.webkit.org/changeset/68103>
All reviewed patches have been landed. Closing bug.