element-tiptap icon indicating copy to clipboard operation
element-tiptap copied to clipboard

When using "Heading" extension, this component won't unmount

Open yz3358 opened this issue 1 year ago • 0 comments

Describe the bug When using "Heading" extension, component won't unmount properly. This is actually quite serious, when component can't unmount, the vue-router fails to navigate to next page.

To Reproduce Steps to reproduce the behavior:

  1. Register the component as doc intended, including the "Heading" extension (with configure or not doesn't matter)
  2. Put the component in PageA, navigate to PageA, the component displayed as expected.
  3. Navigate to PageB
  4. See error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'exposed') at getExposeProxy (chunk-GEFBBB5D.js?v=ec5423d8:6314:16) at setRef (chunk-GEFBBB5D.js?v=ec5423d8:4310:42) at unmount (chunk-GEFBBB5D.js?v=ec5423d8:5469:7) at unmountChildren (chunk-GEFBBB5D.js?v=ec5423d8:5587:7) at unmount (chunk-GEFBBB5D.js?v=ec5423d8:5496:9) at unmountComponent (chunk-GEFBBB5D.js?v=ec5423d8:5567:7) at unmount (chunk-GEFBBB5D.js?v=ec5423d8:5482:7) at unmountComponent (chunk-GEFBBB5D.js?v=ec5423d8:5567:7) at unmount (chunk-GEFBBB5D.js?v=ec5423d8:5482:7) at unmountChildren (chunk-GEFBBB5D.js?v=ec5423d8:5587:7)

From the call stack, I guess this should be a vue runtime error. Also, toggle a boolean value with v-if will trigger the same error. The component won't go away as expected.

If "Heading" extension is removed, everything works fine. I guess there's something wrong with that extenstion.

Expected behavior The component should unmount.

Desktop (please complete the following information):

  • OS: MacOS 13.3
  • Browser: chrome
  • Version: Version 120.0.6099.109 (Official Build) (arm64)

Additional context "vue": "3.2.45" "vite": "^3.2.7" "element-plus": "^2.4.3" "element-tiptap": "^2.2.1"

yz3358 avatar Dec 19 '23 02:12 yz3358