diff --git a/frontend/src/lib/components/TemplateEditor.svelte b/frontend/src/lib/components/TemplateEditor.svelte index fb3455f678..63f57ff942 100644 --- a/frontend/src/lib/components/TemplateEditor.svelte +++ b/frontend/src/lib/components/TemplateEditor.svelte @@ -26,6 +26,7 @@ import EditorTheme from './EditorTheme.svelte' import FakeMonacoPlaceHolder from './FakeMonacoPlaceHolder.svelte' import { setMonacoJsonOptions } from './monacoLanguagesOptions' + import { inputBorderClass } from './text_input/TextInput.svelte' export const conf = { wordPattern: @@ -505,10 +506,12 @@ editor.onDidFocusEditorText(() => { dispatch('focus') + isFocus = true }) editor.onDidBlurEditorText(() => { dispatch('blur') + isFocus = false updateCode() }) @@ -604,6 +607,7 @@ editor?.focus() } + let isFocus = false let mounted = false let loadTimeout: number | undefined = undefined onMount(async () => { @@ -661,16 +665,14 @@ {code} lineNumbersWidth={14} lineNumbersOffset={-20} - class="border template nonmain-editor rounded min-h-4 bg-surface-secondary !py-[8px] mx-0.5 overflow-clip" + class="template nonmain-editor rounded min-h-4 bg-surface-secondary !py-[8px] mx-0.5 overflow-clip" /> {/if}
diff --git a/frontend/src/lib/components/text_input/TextInput.svelte b/frontend/src/lib/components/text_input/TextInput.svelte index e79fd72437..3d324d5679 100644 --- a/frontend/src/lib/components/text_input/TextInput.svelte +++ b/frontend/src/lib/components/text_input/TextInput.svelte @@ -1,3 +1,23 @@ + +