mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
fix(editor): should not select or open latex editor when readonly (#10601)
This commit is contained in:
@@ -76,6 +76,11 @@ export class LatexBlockComponent extends CaptionedBlockComponent<LatexBlockModel
|
||||
);
|
||||
|
||||
this.disposables.addFromEvent(this, 'click', () => {
|
||||
// should not open editor or select block in readonly mode
|
||||
if (this.doc.readonly) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isBlockSelected) {
|
||||
this.toggleEditor();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user