mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
fix(text): selection and cursor not maintained properly when switching tabs
This commit is contained in:
parent
0f1c505823
commit
e4a2a8e56d
@ -265,8 +265,13 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
|
const editor = this.watchdog.editor;
|
||||||
|
if (editor) {
|
||||||
|
editor.editing.view.focus();
|
||||||
|
} else {
|
||||||
this.$editor.trigger("focus");
|
this.$editor.trigger("focus");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
scrollToEnd() {
|
scrollToEnd() {
|
||||||
this.watchdog?.editor?.model.change((writer) => {
|
this.watchdog?.editor?.model.change((writer) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user