Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor): disable pointer event in surface-ref content (#11448)

L-Sun727c540fda0d
diff --git a/blocksuite/affine/blocks/block-surface-ref/src/surface-ref-block.ts b/blocksuite/affine/blocks/block-surface-ref/src/surface-ref-block.ts
index 989dcc88f0..653c9e2a88 100644
--- a/blocksuite/affine/blocks/block-surface-ref/src/surface-ref-block.ts
+++ b/blocksuite/affine/blocks/block-surface-ref/src/surface-ref-block.ts
@@ -106,6 +106,15 @@ export class SurfaceRefBlockComponent extends BlockComponent<SurfaceRefBlockMode
pointer-events: none;
user-select: none;
}
+
+ .ref-viewport-event-mask {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ pointer-events: auto;
+ }
`;
private _previewDoc: Store | null = null;
@@ -390,6 +399,7 @@ export class SurfaceRefBlockComponent extends BlockComponent<SurfaceRefBlockMode
}).render()
: nothing;
})}
+ <div class="ref-viewport-event-mask"></div>
</div>
</div>`;
}