web: use drawSelection to workaround cursor bug when using CodeMirror with ShadowDOM in firefox

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-10-16 13:55:53 +02:00
parent 76531589dd
commit b515126061
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import {
} from "@codemirror/language";
import * as yamlMode from "@codemirror/legacy-modes/mode/yaml";
import { Compartment, EditorState, Extension } from "@codemirror/state";
import { EditorView, keymap, lineNumbers } from "@codemirror/view";
import { EditorView, drawSelection, keymap, lineNumbers } from "@codemirror/view";
import { AKElement } from "@goauthentik/elements/Base";
import YAML from "yaml";
@ -145,6 +145,7 @@ export class CodeMirrorTextarea extends AKElement {
syntaxHighlighting(defaultHighlightStyle),
this.getLanguageExtension(),
lineNumbers(),
drawSelection(),
EditorView.lineWrapping,
EditorState.readOnly.of(this.readOnly),
EditorState.tabSize.of(2),