Skip to content
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

[Bug]: Tiptap CollaborationCursor flickering issue #4782

Closed
1 of 2 tasks
bahadiraraz opened this issue Jan 12, 2024 · 8 comments
Closed
1 of 2 tasks

[Bug]: Tiptap CollaborationCursor flickering issue #4782

bahadiraraz opened this issue Jan 12, 2024 · 8 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@bahadiraraz
Copy link

bahadiraraz commented Jan 12, 2024

Which packages did you experience the bug in?

@tiptap/extension-collaboration-cursor

What Tiptap version are you using?

^2.1.16

What’s the bug you are facing?

I'll use HocuspocusProvider, TiptapCollabProvider, and WebsocketProvider regardless, but the CollaborationCursor is flickering. In some browsers, it's less noticeable, but the problem still exists in all browsers.

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

There should be no flickering

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@bahadiraraz bahadiraraz added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Jan 12, 2024
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Jan 12, 2024
@bahadiraraz
Copy link
Author

@nikgraf @bdbch can you please take a look ?

@bdbch
Copy link
Member

bdbch commented Jan 12, 2024

Are you using the strict mode on react?

@bahadiraraz
Copy link
Author

Are you using the strict mode on react?

No

@bahadiraraz
Copy link
Author

In the build version of Next.js, the problem gets resolved, but there is a flickering issue when running in Next.js dev mode.
@bdbch

@Bajena
Copy link

Bajena commented Jan 30, 2024

👋 We're experiencing the same issue in react. I've recorded a loom here (sorry for my baby crying in the background 🙈):
https://www.loom.com/share/251f3281d0ce4df491d9db0913479bd5

We're using the TipTapCollabProvider with YDoc:

const doc = new Y.Doc();
const provider = new TiptapCollabProvider({
  name: 'test-product-doc', // any identifier - all connections sharing the same identifier will be synced
  appId: 'app-id', // replace with YOUR_APP_ID
  token: 'TOKEN', // replace with your JWT
  document: doc,
});

Do you have any idea what could be causing that?

@ThisDavidRichard
Copy link
Contributor

Hey @Bajena @bahadiraraz , can you review this comment and check if the suggested code works for you?
#4482 (comment)

@Bajena
Copy link

Bajena commented Feb 1, 2024

Thanks @ThisDavidRichard, I just verified that it fixed the bug for us 👍

Btw, the double wrapping of requestAnimationFrame seems to be unnecessary, might be worth checking that :)

@svenadlung
Copy link
Member

Should be fixed in 2.2.2 :)

@github-project-automation github-project-automation bot moved this from Triage open to Done in Tiptap Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

5 participants