From 2cbb6484560730510e8d2165eaff03661ef1ebb5 Mon Sep 17 00:00:00 2001 From: Abdo Date: Sun, 17 Nov 2024 18:11:21 +0300 Subject: [PATCH] Fix editor width changing as tag completions shown (#3574) * Fix editor width changing as tag completions shown * Avoid @render for now * Ignore eslint warning --- ts/lib/components/Portal.svelte | 45 +++++++++++++++++++++++ ts/lib/components/RenderChildren.svelte | 6 +++ ts/lib/components/WithFloating.svelte | 22 ++++++----- ts/lib/sveltelib/portal.ts | 36 ------------------ ts/lib/tag-editor/WithAutocomplete.svelte | 1 + 5 files changed, 64 insertions(+), 46 deletions(-) create mode 100644 ts/lib/components/Portal.svelte create mode 100644 ts/lib/components/RenderChildren.svelte delete mode 100644 ts/lib/sveltelib/portal.ts diff --git a/ts/lib/components/Portal.svelte b/ts/lib/components/Portal.svelte new file mode 100644 index 000000000..a71788ae2 --- /dev/null +++ b/ts/lib/components/Portal.svelte @@ -0,0 +1,45 @@ + + + + + + +{#if !target} + + + +{/if} diff --git a/ts/lib/components/RenderChildren.svelte b/ts/lib/components/RenderChildren.svelte new file mode 100644 index 000000000..e09533eae --- /dev/null +++ b/ts/lib/components/RenderChildren.svelte @@ -0,0 +1,6 @@ + + + diff --git a/ts/lib/components/WithFloating.svelte b/ts/lib/components/WithFloating.svelte index 418054793..b8e19ef35 100644 --- a/ts/lib/components/WithFloating.svelte +++ b/ts/lib/components/WithFloating.svelte @@ -19,7 +19,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import type { EventPredicateResult } from "$lib/sveltelib/event-predicate"; import { documentClick, documentKeyup } from "$lib/sveltelib/event-store"; import { registerModalClosingHandler } from "$lib/sveltelib/modal-closing"; - import portal from "$lib/sveltelib/portal"; + import Portal from "./Portal.svelte"; import type { PositioningCallback } from "$lib/sveltelib/position/auto-update"; import autoUpdate from "$lib/sveltelib/position/auto-update"; import type { PositionAlgorithm } from "$lib/sveltelib/position/position-algorithm"; @@ -195,17 +195,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html {/if} {/if} -
- {#if show} - - {/if} - - +