Opened 12 years ago

Last modified 10 years ago

#9161 confirmed Bug

[IE]: SCAYT affecting IsDirty

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone:
Component: UI : Spell Checker Version: 3.0
Keywords: IE, Review?, HasPatch Cc: WebSpellChecker.net

Description

This is the continuation of #4688

WebSpellChecker team has been reported CheckDirty functionality doesn't work correctly after replacing misspellings with correct word. While preparing solution we discovered additional problem in IE. Here are steps to reproduce:

  1. Open http://ckeditor.com/demo in any IE
  2. Enable SCAYT and wait for all misspellings would be underlined
  3. Change editor's mode to <Source> then to <WYSIWYG>
  4. Run in console CKEDITOR.instances.editor1.checkDirty()

NOTE: For the above steps you can use api sample

Expected result: checkDirty=false
Actual result: checkDirty=true

Problem has been reproducible in all versions of IE from CKEditor 3.0

Attachments (2)

4688.patch (2.0 KB) - added by Jakub Ś 12 years ago.
4688.2.patch (2.3 KB) - added by WebSpellChecker.net 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by Jakub Ś

Attachment: 4688.patch added

comment:1 Changed 12 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 11 years ago by Frederico Caldeira Knabben

Unfortunately this patch is not acceptable. It may make the checkDirty function very unstable. For example, if somehow we change the checkDirty function logic, it'll not work well when SCAYT is enabled.

It is clear that the problem is the getSnapshot call, which needs to get fixed by SCAYT on the checkDirty call. Because of this, the logic could be somehow similar, but made in a way that the getSnapshot result is fixed. Something like this (untested... just the relevant "if" part inside the override function):

var oriGetSnapshot = editor.getSnapshot;
editor.getSnapshot = function()
{
	return scayt_instance.reset( oriGetSnapshot.apply( this, arguments ) );
}
retval = org.apply( this, arguments );
editor.getSnapshot = oriGetSnapshot;

In this way we don't touch any original functionality of the editor, avoiding any possibility of breaking it.

Changed 11 years ago by WebSpellChecker.net

Attachment: 4688.2.patch added

comment:3 Changed 11 years ago by WebSpellChecker.net

Keywords: Review? HasPatch added

Here is another patch which address the comments

comment:4 Changed 10 years ago by Wiktor Walc

Component: GeneralUI : Spell Checker
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