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.

  1. Open Developers console
  2. Go to http://ckeditor.com/demo#widgets
  3. Run CKEDITOR.instances.editor2.checkDirty(); in console

--> returns false

  1. Run var d1 = CKEDITOR.instances.editor2.getData(); in console
  2. Click on the apollo picture in the 2nd editor, but do not move it.
  3. Run CKEDITOR.instances.editor2.checkDirty(); in console

--> returns true

  1. Run var d2 = CKEDITOR.instances.editor2.getData(); in console
  2. 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.

Change History (0)

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