Suggestion menu, when opening on top, isn't positioned correctly

Open
#2,155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the issue with the / menu, filtering to a small number of items, and inspect the suggestions menu positioning and its 300px minimum height. The fix is complete when a short menu that opens above the cursor is positioned close to the cursor without the excessive gap described.

Written by the indexing model from the issue text.

Description

bug:P2

Describe the bug
When opening any suggestions menu, if there's not enough space on the bottom and it opens on top, if the menu only has a few items, it is placed far above the cursor.

It appears the suggestions menu has a min-height of 300px. If the menu's items are few and thus the menu is shorter than 300px, the menu appears too far above. Not sure why the 300px min-height is added but it causes this issue and there's no way to override it since its added as a style attribute not through a class.

You can reproduce this issue with the / menu by simply filtering down to a small number of items.

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.