Open rantingmong opened 4 months ago
Just leaving a note - after basic testing this issue looks to be specific to NextJS
Just leaving a note - after basic testing this issue looks to be specific to NextJS
Sounds unlikely to me, but would be very interesting. I think when all code is loaded on the client, it's very unlikely that there's a difference in behavior as the code should be the same. Could it be a CSS issue instead? What makes you think it's specific to next?
IIRC I tested in both a local React project and a NextJS one and could only get it reproduced on NextJS. Agree though that it would be really weird for that to be the root cause. I don't think it's CSS because the positioning gets handled by FloatingUI, which sets inline styles. If anything, it would be due to FloatingUI getting the wrong reference position from the DOM.
Describe the bug
I tried adding a simple
BlockNoteView
withslashMenu
set tofalse
and having aSuggestionMenuController
configured below:customSlashMenuItems
is just a list ofDefaultReactSuggestionItem
.When opening the suggestion menu via the trigger character, the menu sometimes will appear on a position that is far away from the cursor. See video below:
https://github.com/user-attachments/assets/1f420d57-52a1-4ee2-bc96-c7ffbe77772f
The bug appears regardless if shadcn or mantine is used.
To Reproduce
@blocknote/core
@blocknote/react
and@blocknote/shadcn
or@blocknote/mantine
BlocknoteView
with the scenario described aboveMisc