Page 1 of 1

Incorrect behavior of dirty listener

Posted: Fri Mar 02, 2018 2:22 pm
by aleh.haidash
Hello.
I use Webapp 19.1 and faced with Incorrect behavior of dirty listener.
Steps to reproduce:
1) Open document, don't made any changes.
2) Using js api change readonly state

Code: Select all

editor.setReadOnlyState({readOnly:true});
3) I recived notify that dirty status was changed to TRUE

Code: Select all

goog.events.listen(editor, sync.api.Editor.EventTypes.DIRTY_STATUS_CHANGED, function(e) {
//here
});
4) Herewith the undo button becomes active

Why it happens? How can i avoid this situation?

Thanks.

Re: Incorrect behavior of dirty listener

Posted: Fri Mar 02, 2018 4:20 pm
by mihaela
Hi,

We did not reproduced the problem following the steps you provided.
Maybe you have some customization that modifies the document before setting the editor as read only.
If you remove the following line from your code the editor is still marked as modified after open?

Code: Select all

editor.setReadOnlyState({readOnly:true});
Best Regards,
Mihaela