Fix focusing children of editors; add focus() to type

This commit is contained in:
Quinten Kock 2025-11-30 02:06:20 +01:00
parent 1299590f5d
commit d9d856e269
2 changed files with 2 additions and 1 deletions

View File

@ -147,7 +147,7 @@ export class Editor implements Displayable {
// lintKeymap,
],
});
this.view.dom.addEventListener("focusin", () => this.focus());
this.view.dom.addEventListener("focusin", () => this.view.dom.scrollIntoView({ behavior: "smooth", }));
van.derive(() => {
LanguageDescription.matchFilename(languages, file.filePath.val)

View File

@ -11,6 +11,7 @@ export interface Displayable {
setDeleteFunction(del: () => void): void;
title(): string;
close(): void;
focus(): void;
dom: HTMLElement;
}