Skip to content

Commit d0003b1

Browse files
Fixed paste event handling in non-selectable blocks (#1094)
1 parent 8cf3d96 commit d0003b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/schema/blocks/createSpec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ export type CustomBlockImplementation<
6868
export function applyNonSelectableBlockFix(nodeView: NodeView, editor: Editor) {
6969
nodeView.stopEvent = (event) => {
7070
// Ensures copy events are handled by the browser and not by ProseMirror.
71-
if (event.type === "copy" || event.type === "cut") {
71+
if (
72+
event.type === "copy" ||
73+
event.type === "cut" ||
74+
event.type === "paste"
75+
) {
7276
return true;
7377
}
7478
// Blurs the editor on mouse down as the block is non-selectable. This is

0 commit comments

Comments
 (0)