[Bug]: Vue - Editor view destruction before Transition end #5752
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
Affected Packages
vue
Version(s)
2.9.0
Bug Description
The issue is very close to the one described in #5646, concerning the fact that the content of the DOM is destroyed before Vue finished a Transition, so the editor content disappears during the leaving transition.
But unlike the issue above, it is linked to the hierarchy of component. Basically, this is something like:
<Transition>
and a child with a v-ifEditorContent
componentWhen parent turns off the condition, the
useEditor
in child calls theonBeforeUnmount
hook that calls theeditor.destroy
, finally removing all DOM nodes. But this call to PM leads to the editor content being removed while the editor stills visible.It seems more complicated than #5646 as it may needs to go to the core of tiptap. The linked fork of tiptap shows the explained issue by restructuring the Transition example with Vue.
I'd be willing to make a PR to fix this, but I don't really know what's the best way to solve this.
Browser Used
Firefox
Code Example URL
https://github.com/Ericlm/tiptap
Expected Behavior
Transition on a parent should not cause a child component to lose it's tiptap content, and let Vue destroying all children nodes at the end.
Additional Context (Optional)
This issue is directly linked to:
Dependency Updates
The text was updated successfully, but these errors were encountered: