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]: Editable prop doesn't enable editor when changing the value from false to true. #5990

Closed
1 task done
dmytro-shapovalov opened this issue Jan 6, 2025 · 1 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

Comments

@dmytro-shapovalov
Copy link

Affected Packages

react

Version(s)

2.9.0

Bug Description

Steps:

  1. Use EditorProvider component;
  2. Create React state with initial value of false;
  3. Pass that state to editable prop for EditorProvider;
  4. Set the state to true after some timeout;
  5. Notice that editor isn't activated.

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Editor should react to the change of editable prop.

Additional Context (Optional)

I've updated to latest version and noticed this behavior. Last version where the editor works as expected is 2.8.0 for all packages.

Wasn't able to use EditorProvider in sandbox due to some strange issue with Schema not found 🫤.

Dependency Updates

  • Yes, I've updated all my dependencies.
@dmytro-shapovalov dmytro-shapovalov 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 6, 2025
@nperez0111
Copy link
Contributor

This is for performance, recommended is to either editor.setEditable(false) or key={editable}

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
None yet
Development

No branches or pull requests

2 participants