mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
wip
This commit is contained in:
parent
8da094cd3c
commit
bd8e5f255b
@ -144,4 +144,13 @@ export default class NoteDetailWidget extends TabAwareWidget {
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
async focusOnDetailListener({tabId}) {
|
||||
if (this.tabContext.tabId === tabId) {
|
||||
await this.refresh();
|
||||
|
||||
const widget = this.getTypeWidget();
|
||||
widget.focus();
|
||||
}
|
||||
}
|
||||
}
|
@ -30,14 +30,9 @@ export default class NoteTitleWidget extends TabAwareWidget {
|
||||
|
||||
this.$noteTitle.on('input', () => this.titleChanged());
|
||||
|
||||
if (utils.isDesktop()) {
|
||||
// keyboard plugin is not loaded in mobile
|
||||
utils.bindElShortcut(this.$noteTitle, 'return', () => {
|
||||
this.getComponent().focus();
|
||||
|
||||
return false; // to not propagate the enter into the editor (causes issues with codemirror)
|
||||
});
|
||||
}
|
||||
utils.bindElShortcut(this.$noteTitle, 'return', () => {
|
||||
this.trigger('focusOnDetail', {tabId: this.tabContext.tabId});
|
||||
});
|
||||
|
||||
return this.$widget;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user