Try the fastest and simplest way to install ONLYOFFICE

onDocumentStateChange is not triggered in fast co-edit mode

Integration questions/issues

onDocumentStateChange is not triggered in fast co-edit mode

Postby zhiw » Tue Mar 21, 2017 11:29 pm

I am not sure this is a potential bug or this is an designed behaviour.

Based on the documentation here: https://api.onlyoffice.com/editors/config/events

I register a javascript callback function on onDocumentStateChange event of OnlyOffice editor, and I can see the console log is printed when only one user is editing the document in editor. However, when another user starts to edit the same document(co-editing), this event will never be triggered any more no matter which user makes change to that document, and I found if I change co-edit mode to strict, then this event can be triggered again.

The steps to reproduce the issue:

Browsers: Chrome 57.0.2987.98 or Firefox 47.0
OS: Ubuntu 15.10

1. Register any callback javascript function to onDocumentStateChange event
2. Wrap this event object in to config object as member of events property based on the documentation https://api.onlyoffice.com/editors/config/editor.
3. Open a document in editor, check the callback function is invoked when there is any change made and saved.
4. Leave the editor open, open another editor window by using a different user, the callback function will never be invoked any more in both of editor window when changes are made

What I expected is in fast co-edit mode, no matter how many users are editing the specific document, this event will still be triggered so that the callback function bind to onDocumentStateChange event can be invoked correctly for each user rather than having to switch co-edit mode to strict.

Please check this issue, thank you.

If this is designed behaviour, I request to change it as we've already have onCollaborativeChanges event, which makes more sense to use this event when people want to capture document change when multiple users are editing the same document and I'm ok with this event to work only in strict mode, but I reckon onDocumentStateChange should reflect individual's no matter what the current co-edit mode is.
zhiw
 
Posts: 3
Joined: Tue Mar 21, 2017 11:14 pm

Re: onDocumentStateChange is not triggered in fast co-edit m

Postby Maxim » Thu Mar 23, 2017 10:15 am

Hello zhiw!
I see the same problem here, there is an answer.
Maxim
 
Posts: 1170
Joined: Tue Oct 11, 2016 2:34 pm

Re: onDocumentStateChange is not triggered in fast co-edit m

Postby zhiw » Fri Mar 24, 2017 12:20 am

Hi Maxim,

Thank you for your response, I will keep an eye on the next release. :)

Regards,
Zhi
zhiw
 
Posts: 3
Joined: Tue Mar 21, 2017 11:14 pm


Return to API

Who is online

Users browsing this forum: No registered users and 1 guest