TypeCellOS / TypeCellOS/BlockNote
Weird behaviour of cursor and focus with images
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 772
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 17
Description
What’s broken?
Focus on image
Arrow up and the cursor goes above but not on a line if no line is actually above.
Or arrow down but nothing happens. It doesn't go to the empty line bellow.
To create the empty line I have to click below the image with my mouse
What did you expect to happen?
if no element above the image, with arrow up, focus should stay on image
With arrow down it should create an empty line for the cursor to move down and save a click
Steps to reproduce
https://github.com/user-attachments/assets/fb21d53e-c130-4083-a990-e8815a107698
BlockNote version
https://www.blocknotejs.org/demo#7ixm8
Environment
No response
Additional context
No response
Contribution
- I'd be interested in contributing a fix for this issue
Sponsor
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the image cursor and focus behavior from the linked video and BlockNote demo, then trace the editor's image-selection and arrow-key handling. Done means Arrow Up keeps focus on the image when there is no element above, while Arrow Down creates or reaches an empty line below without requiring a mouse click.
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
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100