fix(client/search): broken search in read-only text

This commit is contained in:
Elian Doran
2025-05-25 23:09:16 +03:00
parent b4df8f75b9
commit 2f406aea83
2 changed files with 14 additions and 12 deletions

View File

@@ -248,10 +248,10 @@ export default class FindWidget extends NoteContextAwareWidget {
case "code":
return this.codeHandler;
case "text":
return this.textHandler;
default:
const readOnly = await this.noteContext?.isReadOnly();
return readOnly ? this.htmlHandler : this.textHandler;
default:
console.warn("FindWidget: Unsupported note type for find widget", this.note?.type);
}
}