diff --git a/packages/text-editor/src/components/ReferenceInput.svelte b/packages/text-editor/src/components/ReferenceInput.svelte index 19415734b9..842d0f8fcb 100644 --- a/packages/text-editor/src/components/ReferenceInput.svelte +++ b/packages/text-editor/src/components/ReferenceInput.svelte @@ -344,12 +344,14 @@ textEditor.clear() } }} - on:on:blur={() => { + on:blur={() => { focused = false + dispatch('blur', focused) }} on:focus={() => { focused = true updateFocus() + dispatch('focus', focused) }} extensions={[completionPlugin]} on:selection-update={updateFormattingState} diff --git a/packages/ui/src/components/TooltipInstance.svelte b/packages/ui/src/components/TooltipInstance.svelte index be12b16396..6c2f219517 100644 --- a/packages/ui/src/components/TooltipInstance.svelte +++ b/packages/ui/src/components/TooltipInstance.svelte @@ -161,7 +161,9 @@ const inPopup: boolean = ev.x >= rectP.left && ev.x <= rectP.right && ev.y >= rectP.top - dT && ev.y <= rectP.bottom + dB - if ((tooltipSW && !inTrigger) || !(inTrigger || inPopup)) hideTooltip() + if ($tooltip.kind !== 'popup') { + if ((tooltipSW && !inTrigger) || !(inTrigger || inPopup)) hideTooltip() + } } } @@ -170,15 +172,27 @@ onDestroy(() => hideTooltip()) +{#if $tooltip.kind === 'popup'} +