Open man-shar opened 8 months ago
Thanks. It would be very useful to have a reproducible example of this indeed.
I doubt it's related to the global dragstart. My first guess is it could be related to some TipTap internal code (https://github.com/ueberdosis/tiptap/blob/48935a2f26e3da2fa13c265773dfe259893829cc/packages/core/src/NodeView.ts#L121)
Sure! here it is: https://codesandbox.io/p/devbox/blocknote-drag-select-events-example-y9g4n3?file=%2Fsrc%2FEditor.jsx%3A18%2C8&workspaceId=46d3967c-edd3-49c2-bfa2-da9e852ba600
Try adding the new block called "Custom Table" using the slash menu and you'll be able to replicate this issue
As an addendum, I managed to show a usecase for the a default prop being a function as well I mentioned in #394 (Note the customId
creation inside CustomBlock.jsx
)
It seems that this event handler in TipTap is blocking the selection: https://github.com/ueberdosis/tiptap/blob/48935a2f26e3da2fa13c265773dfe259893829cc/packages/core/src/PasteRule.ts#L174
I'm not sure yet why, because there's no preventDefault
or anything
Describe the bug I have a custom React block that displays a table (I use antd's table component). I am unable to select text inside the table when the active block is clicked. Upon some debugging, wondering if this could be the global dragstart handlers?
Attaching a video showing the issue.
The exact bug description is:
For some reason, the dragstart events are fired when I try to select the text in the second way.
Let me know if any ideas why this might be happening? I haven't created a repro yet, but could jic needed!
https://github.com/TypeCellOS/BlockNote/assets/12295494/4a831dac-2cda-4443-84d3-f13fa971d1ce