Opened 15 years ago

Closed 15 years ago

#3562 closed Bug (duplicate)

Reload SCAYT before insertElement

Reported by: Artur Formella Owned by: Artur Formella
Priority: Normal Milestone: CKEditor 3.0
Component: UI : Spell Checker Version: SVN (CKEditor) - OLD
Keywords: Cc: WebSpellChecker.net

Description

Steps to reproduce:

-Enable SCAYT plugin -Insert "mmmmmmmmmmmmmmmmmmmmmmm" -Put cursor in the middle of this word. -Insert smile using the dialog ( mmmmmmm :D mmmmmmm ) . -Click on the first word to open context menu and click any of the suggestions.

Result: The whole SPAN was replaced and smile is missing. Expected result: only part of the word is replaced with the suggestion.

Attachments (3)

3562.patch (1.5 KB) - added by Artur Formella 15 years ago.
3562_2.patch (1.5 KB) - added by Artur Formella 15 years ago.
3562_3.patch (1.7 KB) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 15 years ago by Artur Formella

#3569 has been marked as DUP

comment:2 Changed 15 years ago by Artur Formella

Milestone: CKEditor 3.xCKEditor 3.0
Resolution: fixed
Status: newclosed

It must be fixed before #3560

comment:3 Changed 15 years ago by Artur Formella

Resolution: fixed
Status: closedreopened

comment:4 Changed 15 years ago by Artur Formella

Owner: set to Artur Formella
Status: reopenednew

Changed 15 years ago by Artur Formella

Attachment: 3562.patch added

comment:5 Changed 15 years ago by Artur Formella

Keywords: Review? added

Local "var scayt" was changed into "var instance" because scayt is a global variable.

Patch doesn't fix #3569. This bug seems to be in the scayt engine.

comment:6 Changed 15 years ago by Frederico Caldeira Knabben

Cc: WebSpellChecker.net added

comment:7 Changed 15 years ago by Garry Yao

Keywords: Review- added; Review? removed

I wonder if we need to reset the scayt instance:

instance.reset();
instance.setDisabled( false );

Does it work if we only refresh the scayt after insertElement with instnace.refresh()?
And not sure why unlock the selection is necessary.

Changed 15 years ago by Artur Formella

Attachment: 3562_2.patch added

comment:8 Changed 15 years ago by Artur Formella

Keywords: Review? added; Review- removed

instance.refresh() doesn't work in this case, I don't know when it works.

instance.reset(); is to disable SCAYT (instance.setDisabled( true ); also can be used) instance.setDisabled( false ); is to enable SCAYT

editor.getSelection().unlock(); is used because of the JS error:

selection/plugin.js line 926

ieRange.moveToElementText( startNode.$ );

called in

if ( CKEDITOR.env.ie )
	editor.getSelection().unlock( true );

in dialog.hide(); in smiley plugin

Patch was very old so I made a new.

comment:9 Changed 15 years ago by Garry Yao

Keywords: Review? removed

It's possible that by calling 'scayt.reset' will change the DOM structure and thus break the selection within editor, so can you try if creating a bookmark will help in this sense? Anyway, after discuss with Artur, we found that we need more knowledge regarding SCAYT engine at API level at least to bring those changes, the reviewing of this ticket will be defered after we have a communication with SpellChecker.net.

Changed 15 years ago by Garry Yao

Attachment: 3562_3.patch added

comment:10 Changed 15 years ago by Artur Formella

Resolution: duplicate
Status: newclosed

#3839 fixes this bug.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy