This issue has been created
There are 8 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-1efd1ca5-2221-4af4-a00b-49dd24688ef2 XWIKI-22385 Open

The WYSIWYG editor remains read-only after it reconnects to the realtime session

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-171e8a43-e3f4-40c1-9f97-d93761bf8029 Marius Dumitru Florea created this issue on 02/Aug/24 14:13
 
Summary: The WYSIWYG editor remains read-only after it reconnects to the realtime session
Issue Type: cid:jira-generated-image-avatar-1efd1ca5-2221-4af4-a00b-49dd24688ef2 Bug
Affects Versions: 15.10.11
Assignee: Unassigned
Components: Realtime
Created: 02/Aug/24 14:13
Priority: cid:jira-generated-image-static-major-cbd340a7-765f-42b0-89aa-4235bae29b8e Major
Reporter: Marius Dumitru Florea
Description:

Follow these steps to reproduce:

  • start editing a wiki page in realtime (with the WYSIWYG editor)
  • switch the browser tab or move to a different window and wait or do something else for more than 30s
  • come back to the realtime WYSIWYG editor

Expected: you can continue editing
Actual: the editor is read-only

 
 

8 updates

 
cid:jira-generated-image-avatar-171e8a43-e3f4-40c1-9f97-d93761bf8029 Changes by Marius Dumitru Florea on 02/Aug/24 14:14
 
Fix Version: 16.4.2
Fix Version: 16.7.0-rc-1
Fix Version: 15.10.12
Development Priority: High
Difficulty: Unknown Medium
Documentation: N/A
Documentation in Release Notes: N/A
Assignee: Marius Dumitru Florea
 
 

1 comment

 
cid:jira-generated-image-avatar-171e8a43-e3f4-40c1-9f97-d93761bf8029 Marius Dumitru Florea on 02/Aug/24 14:23
 

The WebSocket connection needs to be kept alive by sending ping messages. The client side sends these ping message using a timer (setTimeout). The browsers are slowing down timers used by inactive tabs / windows. This can go up to 1 minute, which means that the client side can't send more than 1 ping message per minute when the browser tab is inactive. On the server side we consider the session to be expired if no message is received in the past 30 seconds. For this reason the WebSocket connection is closed and restored at 30s interval when the browser tab is inactive.

When the connection is closed and restored, the realtime editor calls setReadOnly(false) too many times (without a matching setReadyOnly(true)), and the result is that the call to make the editor editable after the connection is established has no effect.

 

So there are two problems:

  • the session idle timeout used on the server side should be increased to be over 1 minute
  • the realtime editor should have a matching setReadOnly(true) for any setReadyOnly(false) calls