Opened 14 years ago

Closed 12 years ago

#6274 closed Bug (expired)

Dirty flag set incorrectly

Reported by: Larry Hinderks Owned by:
Priority: Normal Milestone:
Component: General Version: 3.4
Keywords: Cc: mail@…

Description

The dirty flag returned by checkDirty() is true when the text has not been changed in IE 8 when the document contains a table. It seems to work OK in FF.

Add the following code to the ckeditor page where 'notes' is the id of the CKEditor text area

window.onbeforeunload = function() {

alert( CKEDITOR.instances.notes .checkDirty() );

}

The test case is

  1. Start with a blank page and insert a table using the default settings for the table (3 rows and 2 columns).
  1. Save the page.
  1. Click on any cell in the table (don't change anything).
  1. Navigate to any other page.

The alert will incorrectly show true indicating that the page has been changed. A similar incorrect setting of the dirty flag occurs when you just scroll text with a table in it.

There is nothing special about doing the check in window.onbeforeunload, you can also see the incorrect behavior by setting a timer ( using setInterval() ) to poll and display the dirty flag.

Change History (5)

comment:1 in reply to:  description Changed 14 years ago by sourav moy sau

Hello I am also facing the same issue. checkDirty() is not properly working. I am implementing the same functionality[onbeforeunload] to check change status. But it always shows "true" even if i enter the editor page and navigate away from that page without place the cursor in the editor area. i do test in IE7. i was about to create a new Ticket for this issue. Replying to lhinderks:

The dirty flag returned by checkDirty() is true when the text has not been changed in IE 8 when the document contains a table. It seems to work OK in FF.

Add the following code to the ckeditor page where 'notes' is the id of the CKEditor text area

window.onbeforeunload = function() {

alert( CKEDITOR.instances.notes .checkDirty() );

}

The test case is

  1. Start with a blank page and insert a table using the default settings for the table (3 rows and 2 columns).
  1. Save the page.
  1. Click on any cell in the table (don't change anything).
  1. Navigate to any other page.

The alert will incorrectly show true indicating that the page has been changed. A similar incorrect setting of the dirty flag occurs when you just scroll text with a table in it.

There is nothing special about doing the check in window.onbeforeunload, you can also see the incorrect behavior by setting a timer ( using setInterval() ) to poll and display the dirty flag.

comment:2 Changed 13 years ago by Juergen

Cc: mail@… added

Any (temporary) fix out there?

comment:3 in reply to:  2 Changed 13 years ago by Juergen

Additional information: checkDirty() is true only if you move the mouse over the table.

comment:4 Changed 13 years ago by Jakub Ś

Status: newpending

Checked under latest CKEditor 3.6.2 and checkdirty() works fine.

NOTE:

  1. Save the page.
  2. Click on any cell in the table (don't change anything).

If there was no resetDirty between point 2 and 3 that this ticket should be invalid.

Is anyone still able to reproduce the issue?

comment:5 Changed 12 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
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