TypeCellOS / TypeCellOS/BlockNote

Placeholder not shown when another editor's cursor is on the same line

Open
#2,118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

When the cursor is on an empty line, a placeholder should be displayed. However, in collaborative editing scenarios, the placeholder is not shown if another editor's cursor is present on the same line.

This issue can be observed in the following video:

https://github.com/user-attachments/assets/9c097cac-5c37-4433-a6e3-09e54410fb35

This issue is particularly problematic when editing a completely empty document, as it occurs on the very first line, leading to a confusing user experience.

To Reproduce

  1. Open a document in collaborative editing mode with multiple users - https://www.blocknotejs.org/
  2. One user places their cursor on an empty line
  3. Another user places their cursor on the same empty line
  4. Observe that the placeholder text is not displayed

Expected behavior:
The placeholder should be visible on empty lines regardless of other editors' cursor positions.

Actual behavior:
The placeholder is hidden when multiple cursors are present on the same empty line.

Misc

  • Node version:
  • Package manager:
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

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.

Research direction

Reproduce the issue at the BlockNote collaborative editing demo with two users placing cursors on the same empty line. Trace the placeholder rendering and collaborative cursor handling to determine why the placeholder disappears, then verify that it remains visible on empty lines with other cursors present.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.