Open jh-lee985 opened 1 week ago
I'm struggling with the same issue.
Having a similar issue where the BubbleMenu is breaking hot reload with create-react-app 5 (the latest). We do have collab, but I've mostly disabled it for my own local development, so I'm not sure that's the root cause. bubble-menu-hot-reload-stack-trace.txt
We solved the problem by wrapping the bubble menu in a div tag with a specific class. This class is then assigned as an element property in the BubbleMenu extension.
Something like this
Component =
<div class="bubble-menu">
<bubble-menu
:editor="editor"
:tippy-options="{ duration: 100 }"
v-if="editor"
>
<button @click="editor.chain().focus().toggleBold().run()" :class="{ 'is-active': editor.isActive('bold') }">
Bold
</button>
</bubble-menu>
</div>
extension =
BubbleMenu.configure({
element: document.querySelector('.bubble-menu'),
}),
Could this be because it is vue and related to this https://github.com/ueberdosis/tiptap/pull/5252 🤔
Affected Packages
Bubble menu
Version(s)
2.4.0
Bug Description
We encountered an issue where the Bubble Menu extension, which previously worked fine alongside the Collaboration extension, is no longer functioning after updating all dependencies. The Bubble Menu works correctly when the Collaboration extension is not included, but fails to work when Collaboration is enabled. No errors are indicated.
We discovered that the Bubble Menu plugin gets removed during the execution of the updatePluginViews function in prosemirror-view/dist/index.js. Specifically, in the y-prosemirror/src/plugins/sync phase, the length of this.state.plugins decreases from 76 (including Bubble Menu) to 75, effectively removing the Bubble Menu plugin.
Below is the basic code from the Tiptap example, which replicates the issue:
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
Bubble menu working with collaboration extension
Additional Context (Optional)
No response
Dependency Updates