From 40351295c9d2040235044f900d05a1c3e7332b4d Mon Sep 17 00:00:00 2001 From: donteatfriedrice Date: Tue, 4 Mar 2025 07:27:58 +0000 Subject: [PATCH] fix(editor): should not select or open latex editor when readonly (#10601) --- blocksuite/affine/block-latex/src/latex-block.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blocksuite/affine/block-latex/src/latex-block.ts b/blocksuite/affine/block-latex/src/latex-block.ts index 6c988f078d..04392c6696 100644 --- a/blocksuite/affine/block-latex/src/latex-block.ts +++ b/blocksuite/affine/block-latex/src/latex-block.ts @@ -76,6 +76,11 @@ export class LatexBlockComponent extends CaptionedBlockComponent { + // should not open editor or select block in readonly mode + if (this.doc.readonly) { + return; + } + if (this.isBlockSelected) { this.toggleEditor(); } else {