mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-08-06 13:38:49 +08:00
fix flicker bug for menus
This commit is contained in:
parent
3b3a0103b9
commit
4d4f96bfc0
@ -23,7 +23,7 @@ export const BubbleMenu: React.FC<BubbleMenuProps> = props => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div ref={element} className={props.className}>
|
||||
<div ref={element} className={props.className} style={{ visibility: 'hidden' }}>
|
||||
{props.children}
|
||||
</div>
|
||||
)
|
||||
|
@ -22,7 +22,7 @@ export const FloatingMenu: React.FC<FloatingMenuProps> = props => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div ref={element} className={props.className}>
|
||||
<div ref={element} className={props.className} style={{ visibility: 'hidden' }}>
|
||||
{props.children}
|
||||
</div>
|
||||
)
|
||||
|
@ -36,7 +36,7 @@ export const BubbleMenu = Vue.extend({
|
||||
},
|
||||
|
||||
render(createElement) {
|
||||
return createElement('div', {}, this.$slots.default)
|
||||
return createElement('div', { style: { visibility: 'hidden' } }, this.$slots.default)
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
@ -30,7 +30,7 @@ export const FloatingMenu = Vue.extend({
|
||||
},
|
||||
|
||||
render(createElement) {
|
||||
return createElement('div', {}, this.$slots.default)
|
||||
return createElement('div', { style: { visibility: 'hidden' } }, this.$slots.default)
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
|
@ -42,6 +42,6 @@ export const BubbleMenu = defineComponent({
|
||||
editor.unregisterPlugin(BubbleMenuPluginKey)
|
||||
})
|
||||
|
||||
return () => h('div', { ref: root }, slots.default?.())
|
||||
return () => h('div', { ref: root, style: { visibility: 'hidden' } }, slots.default?.())
|
||||
},
|
||||
})
|
||||
|
@ -36,6 +36,6 @@ export const FloatingMenu = defineComponent({
|
||||
editor.unregisterPlugin(FloatingMenuPluginKey)
|
||||
})
|
||||
|
||||
return () => h('div', { ref: root }, slots.default?.())
|
||||
return () => h('div', { ref: root, style: { visibility: 'hidden' } }, slots.default?.())
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user