Skip to content

fix: skip unnecessary sync on focus/selection changes#211

Open
kuanglijun312 wants to merge 1 commit intoyjs:masterfrom
kuanglijun312:fix/skip-sync-on-focus-selection-change
Open

fix: skip unnecessary sync on focus/selection changes#211
kuanglijun312 wants to merge 1 commit intoyjs:masterfrom
kuanglijun312:fix/skip-sync-on-focus-selection-change

Conversation

@kuanglijun312
Copy link

  • Add document change detection in view.update hook
  • Only sync to Yjs when document content actually changes
  • Prevents unnecessary updateYFragment calls on focus/selection events
  • Improves performance by avoiding redundant synchronization

Fixes issue where focus and selection changes would trigger unnecessary Yjs updates even when document content was unchanged.

- Add document change detection in view.update hook
- Only sync to Yjs when document content actually changes
- Prevents unnecessary updateYFragment calls on focus/selection events
- Improves performance by avoiding redundant synchronization

Fixes issue where focus and selection changes would trigger
unnecessary Yjs updates even when document content was unchanged.
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.

1 participant