Opened 11 years ago
Last modified 11 years ago
#11753 closed Bug
CheckDirty is true after clicking a widget, but getData() returns the same — at Initial Version
Reported by: | Joel | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.2 |
Component: | General | Version: | 4.3 |
Keywords: | Cc: |
Description
In Chrome33 and IE9, the checkDirty() method returns true after a widget drag handle has appeared, even though nothing has changed.
- Open Developers console
- Go to http://ckeditor.com/demo#widgets
- Run CKEDITOR.instances.editor2.checkDirty(); in console
--> returns false
- Run var d1 = CKEDITOR.instances.editor2.getData(); in console
- Click on the apollo picture in the 2nd editor, but do not move it.
- Run CKEDITOR.instances.editor2.checkDirty(); in console
--> returns true
- Run var d2 = CKEDITOR.instances.editor2.getData(); in console
- run d1 === d2 in console
--> returns true
I know this is a battle between getData() vs getSnapshot() vs _.previousValue, but as far as I can see, it is unexpected behaviour. Shouldn't checkDirty() work with getData() especially when there are widgets involved?
Switching to source mode and back does not help.
Bonus: In Chrome CKEDITOR.instances.editor3.checkDirty(); is always true after page has loaded.