mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 13:57:02 +08:00
fix(editor): clicking footnote node should not open doc when readonly (#11749)
This commit is contained in:
@@ -110,6 +110,10 @@ export class AffineFootnoteNode extends WithDisposable(ShadowlessElement) {
|
|||||||
return this.delta.attributes?.footnote;
|
return this.delta.attributes?.footnote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get readonly() {
|
||||||
|
return this.std.store.readonly;
|
||||||
|
}
|
||||||
|
|
||||||
onFootnoteClick = () => {
|
onFootnoteClick = () => {
|
||||||
if (!this.footnote) {
|
if (!this.footnote) {
|
||||||
return;
|
return;
|
||||||
@@ -131,6 +135,10 @@ export class AffineFootnoteNode extends WithDisposable(ShadowlessElement) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private readonly _handleDocReference = (docId: string) => {
|
private readonly _handleDocReference = (docId: string) => {
|
||||||
|
if (this.readonly) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.std
|
this.std
|
||||||
.getOptional(PeekViewProvider)
|
.getOptional(PeekViewProvider)
|
||||||
?.peek({
|
?.peek({
|
||||||
|
|||||||
Reference in New Issue
Block a user