The problem is that the CKEditor doesn't lose the focus right away. It has a focus manager that defers the blur event by 200ms by default. Moreover, when the editor loses the focus its content can be updated (e.g. some placeholders are removed / added, some CSS classes like {{cke_widget_focused}} and {{cke_widget_editable_focus}} are removed). This means the content can become dirty between the moment you click on Save & View (which steals the focus from the editor) and the moment you leave the page (when the leave confirmation is displayed if the content is dirty).
This doesn't affect the standard WYSIWYG editor because it marks the content as not dirty after the save confirmation is received, and it leaves the edit mode quickly after that.
The real-time WYSIWYG editor on the other hand changes the behavior of the Save & View button to behave more like Save & Continue (in order to handle the redirect itself, because it needs to perform some actions after the document is saved). This means the content is marked as not dirty early, when the button is clicked which leaves time for the blur handler to be executed and thus change the content, making it dirty before you leave the edit mode . |
|