There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-aec2461b-9391-495e-8b15-c13441c2806d XWIKI-22401 Open

Content added in Source editing mode can get lost when editing in realtime if no other modification is made after the realtime session is joined

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-dd0470c6-89b5-4ad3-9651-919a1ffe15b9 Marius Dumitru Florea on 12/Aug/24 13:53
 

Dorian Ouakli I modified the onReady callback from wysiwygEditor.js to also call onLocal in order to merge the content of the realtime session with the content of the user joining the realtime session, but it didn't fix the problem:

// Initialize the edited content with the content from the realtime session.
await this._onRemote(info);
this._onLocal();

I was expecting the onLocal call to add a message to the channel, a message that should have been replayed when the other user joins, but for some reason this message is not replayed. But if I type something after switching back from Source, the message is replayed when the other user joins. I don't understand why... The content change event handler calls onLocal so it should be the same as our onLocal call from the onReady connection callback. Take a look when you have some time. I have the feeling that I'm missing something obvious.