Opened 7 years ago

Closed 7 years ago

#3839 closed Bug (fixed)

SCAYT plug-in update

Reported by: SpellChecker.net Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.0
Component: UI : Spell Checker Version: 3.0 RC
Keywords: Review+ Cc:

Description

We have updated SCAYT core and SCAYT plug-in

Some problems were resolved:

#3768 SCAYT setting must not use an object tree #3562 Reload SCAYT before insertElement

There is still open issue in IE with the "new document" and actually we assume with the setData method processing by SCAYT. On "new document" and for example when we try to use WSC (it finish its' work with call to setData) we getting "Permission Denied" error in SCAYT when SCAYT tries to access editable document innerHTML property. At the same time when editor is constructed from the scratch or "source" command is used SCAYT works (i.e. able to access to editable document) without errors.

If you have any thoughts/suggestions on editor behavior on setData vs creating new editable control could you please let us know.

Attachments (2)

3839.patch (19.0 KB) - added by SpellChecker.net 7 years ago.
patch proposed
3839_2.patch (21.9 KB) - added by garry.yao 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by SpellChecker.net

patch proposed

comment:1 in reply to: ↑ description Changed 7 years ago by garry.yao

  • Keywords Review- added; Review? removed

The patch make SCAYT working much better with editor modifications, but there's an obvious issue with IE:

Reproducing Procedures

  1. Open the replace by class example page in IE;
  2. Click on 'SCAYT' -> 'Enable SCAYT';
    • Actual Result: The toolbar button state shows SCAYT is enabled, despite the fact that SCAYT is not enalbed on the document.
  3. Click on 'SCAYT' -> 'Enable SCAYT' again;
    • Actual Result: Now SCAYT is enabled

Regard the 'new page' integration issue:

There is still open issue in IE with the "new document"...

Could you illustrate the codes you used to work with 'setData' please? And I wonder why it's not reside in plugin.js to have it under open discussion.

comment:2 Changed 7 years ago by SpellChecker.net

We're in progress reviewing the problem with IE.

SCAYT core does not use setData - it interacts directly with editable iframe element, but the problem can be easily reproduced in IE if

  1. type some text with misspellings
  1. enable SCAYT
  1. start WSC
  1. update misspellings in WSC
  1. click Finish Checking in WSC: at this point setData is called by WSC. After setData performed (we can see that because content of editor is changed) there are JS errors - one of them is permission denied - same as (or similar to) the problem which happens when "new document" button is clicked.

In the SCAYT plug-in we are using contentDom event to create or re-create SCAYT instance. This even was introduced to us by CK team during adaptation of SCAYT plug-in code to the CKeditor - may be processing of this event is the reason for the problem. We are in progress with this also and would like to get any suggestions if there are any.

comment:3 Changed 7 years ago by SpellChecker.net

The problem with enabling SCAYT in IE on second click is inside SCAYT core. We're going to updated it and update this ticket when the problem will be fixed.

Changed 7 years ago by garry.yao

comment:4 Changed 7 years ago by garry.yao

  • Keywords Review? added; Review- removed
  • Owner set to garry.yao
  • Status changed from new to assigned

Come with a new patch comply more with our codebase, I would ask you SpellChecker.net please check it to get this committed.
I'll open new ticket for the specific IE bug.

comment:5 follow-up: Changed 7 years ago by SpellChecker.net

patch looks ok.

one note on the code which set default parameters values:

CKEDITOR.config.scayt_maxSuggestions = CKEDITOR.config.scayt_maxSuggestions CKEDITOR.config.scayt_autoStartup = CKEDITOR.config.scayt_autoStartup
5;
false;

In your code parameters are hard-coded and not checking whether they are already set. Does the config.js processed after plug-ins are loaded?

comment:6 in reply to: ↑ 5 Changed 7 years ago by fredck

  • Keywords Review+ added; Review? removed

Replying to SpellChecker.net:

In your code parameters are hard-coded and not checking whether they are already set. Does the config.js processed after plug-ins are loaded?

Yes, that's the correct way to set the configuration options, and the custom settings from config.js will properly override them.

comment:7 Changed 7 years ago by garry.yao

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [3857].

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy