Error with Realtime Editor and chromium-based browser

Hello,

I just updated to XWiki 16.6.0 and using the realtime editor now. When edit a page and saving it, everthing works as expcted. But when stay in edit mode and swichting to a different browser tab and returning after 30 or more seconds, I’m getting the follwing error in the console:

Than the editor reconnects to the netflux websocket. Meanwhile I’m getting this message on top of the page:

When reconnected, the alert is hidden. The network tab shows a new websocket connection and everthing seems to be fine.
But I’m not able to edit the page. It seems that the contenteditable attribute on the #xwikicontent div element is set to false, while reconnecting. But in chrome it isn’t set to true again, after it was succesful.

grafik

When I set it to true by hand, I’m able to edit the page.

I was searching around, if someone else has this error, but I didn’t find anything about it. I’m running XWiki as docker behind a traefik as reverse proxy.

Tested Chrome and Edge. Both has the problem.
In Firefox the websocket isn’t stopped. So the contenteditable problem does not occur.

Does anyone else have the same problem?

Thanks for testing real-time editing. I reported and partially fixed Loading... . What’s left to do is Increase max lag before disconnect by mflorea · Pull Request #3 · cryptpad/netflux-websocket · GitHub .

Thanks for your answer. So this would be fixed in the next release?
Is there anything I can do, to fix this temporarily for the 16.6.0?

If someone is searching a quick and dirty workaround (until it get fixed in a future release):

Add a boormark to chrome, give it a nice name and add the following as URL:

javascript:jQuery('#xwikicontent').attr('contenteditable', 'true');

When the realtime editor becomes uneditable, click the bookmark and you should be able to edit the content again.