keep focus when clicking on edit read only note

This commit is contained in:
zadam
2021-06-24 23:50:56 +02:00
parent f1a36f6cea
commit 1b9c3b0759
8 changed files with 99 additions and 83 deletions

View File

@@ -1,4 +1,5 @@
import ButtonWidget from "./button_widget.js";
import appContext from "../../services/app_context.js";
export default class EditButton extends ButtonWidget {
isEnabled() {
@@ -14,7 +15,7 @@ export default class EditButton extends ButtonWidget {
.onClick(widget => {
this.noteContext.readOnlyTemporarilyDisabled = true;
this.triggerEvent('readOnlyTemporarilyDisabled', {noteContext: this.noteContext});
appContext.triggerEvent('readOnlyTemporarilyDisabled', {noteContext: this.noteContext});
this.refresh();
});