Skip to content

Build your personal knowledge base with Trilium Notes

fix(touchbar): hide read-only button after editing

Elian Dorand734ac9e450d
diff --git a/src/public/app/widgets/floating_buttons/edit_button.ts b/src/public/app/widgets/floating_buttons/edit_button.ts
index 0b4d381fd6..2a11f0d011 100644
--- a/src/public/app/widgets/floating_buttons/edit_button.ts
+++ b/src/public/app/widgets/floating_buttons/edit_button.ts
@@ -23,7 +23,6 @@ export default class EditButton extends OnClickButtonWidget {
this.noteContext.viewScope.readOnlyTemporarilyDisabled = true;
appContext.triggerEvent("readOnlyTemporarilyDisabled", { noteContext: this.noteContext });
}
- this.refresh();
});
}
@@ -68,6 +67,10 @@ export default class EditButton extends OnClickButtonWidget {
}
}
+ readOnlyTemporarilyDisabledEvent() {
+ this.refresh();
+ }
+
async noteTypeMimeChangedEvent({ noteId }: { noteId: string }): Promise<void> {
if (this.isNote(noteId)) {
await this.refresh();