From fc50252e97073cf02ba2f5c7f57f8b02a9adfc01 Mon Sep 17 00:00:00 2001 From: SiriusXT <1160925501@qq.com> Date: Fri, 9 May 2025 09:37:50 +0800 Subject: [PATCH] Close the find dialog when the note is temporarily readable --- apps/client/src/widgets/find.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/client/src/widgets/find.ts b/apps/client/src/widgets/find.ts index aa4966a16..8db84e448 100644 --- a/apps/client/src/widgets/find.ts +++ b/apps/client/src/widgets/find.ts @@ -240,6 +240,12 @@ export default class FindWidget extends NoteContextAwareWidget { } } + async readOnlyTemporarilyDisabledEvent({ noteContext }: EventData<"readOnlyTemporarilyDisabled">) { + if (this.isNoteContext(noteContext.ntxId)) { + await this.closeSearch(); + } + } + async getHandler() { if (this.note?.type === "render") { return this.htmlHandler;