Global Dragstart events might be interfering with text selection in custom block.

Open
#644 4 comments 0 reactions 1 assignee View on GitHub

@YousefED is already working on this.

Since Jun 7, 2024.

Assessment

This issue has not been assessed yet.

Description

bug:P3

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:

  1. If I'm on a normal paragraph node, and select the table text without single clicking on the custom block, it works. (Notice that the placeholder "Enter text or type '/' for commands" text is still visible when I do it this way)
  2. But, if I click on the custom block, such that the placeholder text has disappeared, and then try to select text, it doesnt' work.

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

Dominant language
TypeScript
Stars
10.2k
Forks
772
Avg merge
3d 11h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TypeCellOS/BlockNote

All issues in TypeCellOS/BlockNote

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.