diff --git a/.changeset/five-flowers-eat.md b/.changeset/five-flowers-eat.md
new file mode 100644
index 000000000..a44e7c58d
--- /dev/null
+++ b/.changeset/five-flowers-eat.md
@@ -0,0 +1,5 @@
+---
+"@tiptap/vue-3": patch
+---
+
+Fix editor destruction before transition end if editor is nested
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5a7ab416a..e59b86f40 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,7 +36,7 @@ Before submitting a pull request:
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
-Before commiting:
+Before committing:
- Make sure to run the tests and linter before committing your changes.
- If you are making changes to one of the packages, make sure to **always** include a [changeset](https://github.com/changesets/changesets) in your PR describing **what changed** with a **description** of the change. Those are responsible for changelog creation
diff --git a/demos/src/Examples/Transition/Vue/Extension.js b/demos/src/Examples/Transition/Vue/Extension.js
index 9dede7bb0..b83694ad7 100644
--- a/demos/src/Examples/Transition/Vue/Extension.js
+++ b/demos/src/Examples/Transition/Vue/Extension.js
@@ -1,7 +1,7 @@
import { mergeAttributes, Node } from '@tiptap/core'
import { VueNodeViewRenderer } from '@tiptap/vue-3'
-import Component from './Component.vue'
+import Component from './VueComponent.vue'
export default Node.create({
name: 'vueComponent',
diff --git a/demos/src/Examples/Transition/Vue/ParentComponent.vue b/demos/src/Examples/Transition/Vue/ParentComponent.vue
new file mode 100644
index 000000000..7cebbc9a9
--- /dev/null
+++ b/demos/src/Examples/Transition/Vue/ParentComponent.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
diff --git a/demos/src/Examples/Transition/Vue/Component.vue b/demos/src/Examples/Transition/Vue/VueComponent.vue
similarity index 100%
rename from demos/src/Examples/Transition/Vue/Component.vue
rename to demos/src/Examples/Transition/Vue/VueComponent.vue
diff --git a/demos/src/Examples/Transition/Vue/index.spec.js b/demos/src/Examples/Transition/Vue/index.spec.js
index 5bceb87e1..39100317d 100644
--- a/demos/src/Examples/Transition/Vue/index.spec.js
+++ b/demos/src/Examples/Transition/Vue/index.spec.js
@@ -3,26 +3,30 @@ context('/src/Examples/Transition/Vue/', () => {
cy.visit('/src/Examples/Transition/Vue/')
})
- it('should not have an active tiptap instance but a button', () => {
+ it('should have two buttons and no active tiptap instance', () => {
cy.get('.tiptap').should('not.exist')
- cy.get('#toggle-editor').should('exist')
+ cy.get('#toggle-direct-editor').should('exist')
+ cy.get('#toggle-nested-editor').should('exist')
})
- it('clicking the button should show the editor', () => {
- cy.get('#toggle-editor').click()
+ it('clicking the buttons should show two editors', () => {
+ cy.get('#toggle-direct-editor').click()
+ cy.get('#toggle-nested-editor').click()
cy.get('.tiptap').should('exist')
cy.get('.tiptap').should('be.visible')
})
- it('clicking the button again should hide the editor', () => {
- cy.get('#toggle-editor').click()
+ it('clicking the buttons again should hide the editors', () => {
+ cy.get('#toggle-direct-editor').click()
+ cy.get('#toggle-nested-editor').click()
cy.get('.tiptap').should('exist')
cy.get('.tiptap').should('be.visible')
- cy.get('#toggle-editor').click()
+ cy.get('#toggle-direct-editor').click()
+ cy.get('#toggle-nested-editor').click()
cy.get('.tiptap').should('not.exist')
})
diff --git a/demos/src/Examples/Transition/Vue/index.vue b/demos/src/Examples/Transition/Vue/index.vue
index 46e65dc0c..6bd914949 100644
--- a/demos/src/Examples/Transition/Vue/index.vue
+++ b/demos/src/Examples/Transition/Vue/index.vue
@@ -1,12 +1,18 @@
+