ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
26.85k stars 2.24k forks source link

[PRO]: Details with persist: true are collapsed on re-render when editor is read-only #5614

Open fmasa opened 2 weeks ago

fmasa commented 2 weeks ago

Affected Packages

extension-details

Version(s)

2.11.1

Description of the Bug

When the editor is in read-only mode (isEditable: false) and Details extension is configured with persist: true, re-render of the details node causes it to be collapsed again.

https://github.com/user-attachments/assets/8a4a7a34-dfdf-4e13-bd35-36b13ecae5d1

Browser Used

Firefox

Code Example (Preferred)

No response

Expected Behavior

I would expect that when editor has isEditable: false this would behave as if it's configured with the persist: false (ideally taking the initial state from whatever was persisted.

Additional Context (Optional)

No response

Dependency Updates