Skip to content

Allow consumers to update DOM asynchronously for certain transactions#270

Merged
angelaguo merged 2 commits into
mainfrom
allow-skip-flush-sync
Jul 10, 2026
Merged

Allow consumers to update DOM asynchronously for certain transactions#270
angelaguo merged 2 commits into
mainfrom
allow-skip-flush-sync

Conversation

@angelaguo

@angelaguo angelaguo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Provide a mechanism for consumers to skip flushSync on certain transactions - if a transaction has async set to true in its meta, do not flushSync in dispatchTransaction

@angelaguo angelaguo requested review from a team and tilgovi as code owners July 10, 2026 18:35
@angelaguo angelaguo changed the title Skip flushSync if skipFlushSync meta is set on transaction Allow consumers to update DOM asynchronously for certain transactions Jul 10, 2026
@angelaguo angelaguo merged commit 491fa16 into main Jul 10, 2026
3 checks passed
@angelaguo angelaguo deleted the allow-skip-flush-sync branch July 10, 2026 18:52
juliebarwick added a commit to gamma-app/y-prosemirror that referenced this pull request Jul 10, 2026
Set metadata on yCursorPlugin transactions to tell react-prosemirror to
skip flushSync for them. (Corresponding functionality added to
react-prosemirror
[here](handlewithcarecollective/react-prosemirror#270)).
These transactions are consistently firing in between DOM selection
updates and the browser firing the corresponding selectionchange event,
which is causing selection reversions in Gamma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants