Opened 11 years ago
Closed 7 years 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: |
Description
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 11 years ago by
comment:3 Changed 11 years ago by
Status: | new → confirmed |
---|---|
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:5 Changed 8 years ago by
This issue still seems to be present in CKEditor. Is it already possible to fix this?
comment:6 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
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 ) { console.log('here'); }, 1 ); }); });
Seems the issue is fixed.
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.