diff --git a/composables/tiptap/suggestion.ts b/composables/tiptap/suggestion.ts index 209428f6..4a27328e 100644 --- a/composables/tiptap/suggestion.ts +++ b/composables/tiptap/suggestion.ts @@ -67,10 +67,13 @@ function createSuggestionRenderer(component: Component): SuggestionOptions['rend // Use arrow function here because Nuxt will transform it incorrectly as Vue hook causing the build to fail onBeforeUpdate: (props) => { - renderer.updateProps({ ...props, isPending: true }) + props.editor.isFocused && renderer.updateProps({ ...props, isPending: true }) }, onUpdate(props) { + if (!props.editor.isFocused) + return + renderer.updateProps({ ...props, isPending: false }) if (!props.clientRect)