Automattic / isolated-block-editor

Repackages Gutenberg's editor playground as a full-featured multi-instance editor that does not require WordPress.
343 stars 50 forks source link

Collab: Pause incoming remote changes while CJK composition is active #120

Open mirka opened 2 years ago

mirka commented 2 years ago

Steps to reproduce

  1. In the first Paragraph block, Peer 1 types in English.
  2. In the second Paragraph block, Peer 2 simultaneously types in Japanese using an IME.
  3. Peer 2 will have trouble entering characters because their input gets overwritten by remote updates before IME composition is finalized.

Possible fix

Listen for compositionstart events and pause the processing of incoming remote changes until the compositionend event is detected.