Fix focusing children of editors; add focus() to type
This commit is contained in:
parent
1299590f5d
commit
d9d856e269
|
|
@ -147,7 +147,7 @@ export class Editor implements Displayable {
|
||||||
// lintKeymap,
|
// lintKeymap,
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
this.view.dom.addEventListener("focusin", () => this.focus());
|
this.view.dom.addEventListener("focusin", () => this.view.dom.scrollIntoView({ behavior: "smooth", }));
|
||||||
|
|
||||||
van.derive(() => {
|
van.derive(() => {
|
||||||
LanguageDescription.matchFilename(languages, file.filePath.val)
|
LanguageDescription.matchFilename(languages, file.filePath.val)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ export interface Displayable {
|
||||||
setDeleteFunction(del: () => void): void;
|
setDeleteFunction(del: () => void): void;
|
||||||
title(): string;
|
title(): string;
|
||||||
close(): void;
|
close(): void;
|
||||||
|
focus(): void;
|
||||||
dom: HTMLElement;
|
dom: HTMLElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue