Opened 5 years ago

Closed 4 years ago

#11990 closed Bug (fixed)

Codesnippet checkDirty is true after modify code and then rollback or switch to source and back

Reported by: Artur Delura Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.1
Keywords: Cc:

Description (last modified by Jakub Ś)

  1. Open code snippet sample with following code i.e. you must modify sample source.
    <pre>
    <code class="language-javascript">a;
    </code></pre>
    
    
    <pre>
    <code class="language-sql">a;
    </code></pre>
    
  2. Double click on first codesnippet widget, to open dialog.
  3. Remove ; and apply.
  4. Open codesnippet dialog again and rollback changes. Add ; sign where it was.
  5. Apply changes.

Actual result: Calling method CKEDITOR.instances.editor1.ckeckDirty(); return false

Please note: This happend only when there are two codesnippet widgets.

Change History (3)

comment:1 Changed 5 years ago by Jakub Ś

Description: modified (diff)
Status: newconfirmed
Summary: Codesnippet checkDirty is true after modify code and then rollbackCodesnippet checkDirty is true after modify code and then rollback or switch to source and back
Version: 4.4.1

@a.delura i have modified your description as I think you have meant checkDirty.

When you start editor with text like "pp", delete p (checkDirty==true) and then type p again you get checkdirty==false. One would expect same behaviour from a widget holding text-like data.

Weird case scenario with above code is that switching to source mode and back causes checkDirty to return true - it is possible that code is invalid and editor modifies it thus you get such result.

comment:2 Changed 5 years ago by Jakub Ś

Similar issue: #12891.

comment:3 Changed 4 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

This problem is no longer reproducible from CKEditor 4.5.0

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy