Opened 6 years ago

Closed 22 months ago

#10977 closed Bug (fixed)

Correct spelling mistake with native spell checker does not trigger change event

Reported by: Oliver Joseph Ash Owned by:
Priority: Normal Milestone:
Component: General Version: 4.2
Keywords: Cc:


If I correct a spelling mistake inside a CKEditor instance using the native spell checker, the change event is not triggered.

Change History (6)

comment:1 Changed 6 years ago by Jakub Ś

I'm not sure if such spell checked generates any event we can hook into. In such case this is a won't fix issue.

comment:2 Changed 6 years ago by Oliver Joseph Ash

Could you look into it?

comment:3 Changed 6 years ago by Piotrek Koszuliński

Status: newconfirmed
Version: 4.2.2 (GitHub - master)4.2

In my opinion the issue is wider. We do not support native spell checkers for a reason - we cannot hook into them. That's why our undo manager (which is responsible for firing 'change' event) does not know that something's changed.

However, since the native 'input' event was introduced, most likely it will be possible to listen on changes done by native spell checker as well as on changes coming from other sources (e.g. drag&drop for which we'll blind too iirc). I was postulating that undo manager should listen on 'input' and there's a chance that we'll do such change. It not a quick fix though.

Anyway, this issue can be fixed, but it just has to wait for changes undo manager.

comment:4 Changed 2 years ago by Jakub Ś

#16832 was marked as duplicate.

comment:5 Changed 2 years ago by jtermaat

This issue still seems to be present in CKEditor. Is it already possible to fix this?

comment:6 Changed 22 months ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

From what I have checked, native spell checkers in Firefox, Chrome and Safari now fire input event. What is more correcting a word, in CKEditor with native spell checker, updates the undo manager and it is possible to revert that change with Undo button or Ctrl+Z

To test this it is enough to enable editor with naive spell checker (logger in example below is just to show that input event is fired), type few misspell words e.g. I'm back on mondayy, correct them and undo/redo them.

var editor = CKEDITOR.replace( 'editor1', {
	disableNativeSpellChecker : false
editor.on( 'pluginsLoaded', function( evt )
	editor.on( 'contentDom', function( e )
		var editable = editor.editable();
		var doc = editor.document;					
		editable.attachListener( doc, 'input', function( event ) 
		}, 1 );	

Seems the issue is fixed.

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