Skip to content

SuggestionPlugin and collaboration #1457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YousefED opened this issue Feb 24, 2025 · 0 comments
Closed

SuggestionPlugin and collaboration #1457

YousefED opened this issue Feb 24, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@YousefED
Copy link
Collaborator

As described by #1403

In SuggestionPlugin.ts, we depend on queryStartPos. This startPos is not valid anymore after the document has been edited above.

I suppose we could fix this in two ways:

  • Store a Yjs position for the selection instead of a Prosemirror-based one
  • When Yjs transactions are detected, update queryStartPos manually

Note: I was able to reproduce this by disabling transaction.getMeta("blur") (so the menu stays open when you type in a different browser window for testing purposes)

We should also check other places in the codebase where we rely on a stored position in a way that's not compatible with collaborative docs

@YousefED YousefED added the bug Something isn't working label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants