From 57a586c3a7cb86ac468af0cdb0ea810000d61f66 Mon Sep 17 00:00:00 2001 From: Pegasus <42954461+leonace924@users.noreply.github.com> Date: Tue, 13 Jan 2026 07:41:53 -0500 Subject: [PATCH] fix: update the z-index of search button mainly for yaml mode (#28878) --- src/components/ha-code-editor.ts | 1 + src/resources/codemirror.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/ha-code-editor.ts b/src/components/ha-code-editor.ts index f07a3a87f4..b3085aa775 100644 --- a/src/components/ha-code-editor.ts +++ b/src/components/ha-code-editor.ts @@ -255,6 +255,7 @@ export class HaCodeEditor extends ReactiveElement { ...this._loadedCodeMirror.tabKeyBindings, saveKeyBinding, ]), + this._loadedCodeMirror.search({ top: true }), this._loadedCodeMirror.langCompartment.of(this._mode), this._loadedCodeMirror.haTheme, this._loadedCodeMirror.haSyntaxHighlighting, diff --git a/src/resources/codemirror.ts b/src/resources/codemirror.ts index 6102d56dd8..4cb2261b6d 100644 --- a/src/resources/codemirror.ts +++ b/src/resources/codemirror.ts @@ -15,7 +15,11 @@ import { tags } from "@lezer/highlight"; export { autocompletion } from "@codemirror/autocomplete"; export { defaultKeymap, history, historyKeymap } from "@codemirror/commands"; export { highlightingFor, foldGutter } from "@codemirror/language"; -export { highlightSelectionMatches, searchKeymap } from "@codemirror/search"; +export { + highlightSelectionMatches, + search, + searchKeymap, +} from "@codemirror/search"; export { EditorState } from "@codemirror/state"; export { crosshairCursor,