Opened 9 years ago

Last modified 9 years ago

#12547 confirmed Bug

Changes in docprops dialog do not make the editor "dirty"

Reported by: jhub Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6
Keywords: Cc:


When working in full page mode, if you open the editor for a given page, then use the docprops dialog to change a document setting, for example the background color, but you do not make any other changes, then CKEDITOR.editor.checkDirty() will still return false, so the changes will not be saved if saving is done only if checkDirty() returns true.

This is because checkDirty() and resetDirty() use only getSnapshot(), which returns the document body, but all changes in the docprops dialog are outside of the body.

Suggested change:

In checkDirty():

if (this.config.fullPage)
    return this.status == 'ready' && this._.previousValue !== this.getData();
    return this.status == 'ready' && this._.previousValue !== this.getSnapshot();

and in resetDirty():

if (this.config.fullPage)
    this._.previousValue = this.getData();
    this._.previousValue = this.getSnapshot();

Change History (1)

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed

Problem can be reproduced from CKEditor 3.6.

The only thing that has any effect on checkDirty (at least since 4.0) is setting text direction to RTL because it is actually set on the body.

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