You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When adding a new block directly before a large one, Blocknote's view will jump to the next available text cursor position instead of staying at its current scroll position. This can be slightly annoying for users adding consecutive files or images.
Somehow, this issue does not exist if we use the slash menu, it happens only when we use the '+' button
To Reproduce
Add a very large image, or 2 large images consecutively
Attempt to insert a new block right before the image blocks (must be a non-text based block)
You will observe that the view automatically jumps to the end of the images (my observation is it always jumps to the next available text cursor
Misc
Node version: (whatever that blocknote's documentation is using)
Package manager: (whatever that blocknote's documentation is using)
Browser: Bug exists on Chrome and Edge
I'm a sponsor and would appreciate if you could look into this sooner than later 💖
if (
Array.isArray(currentBlock.content) &&
((currentBlock.content.length === 1 &&
isStyledTextInlineContent(currentBlock.content[0]) &&
currentBlock.content[0].type === "text" &&
currentBlock.content[0].text === "/") ||
currentBlock.content.length === 0)
) {
newBlock = editor.updateBlock(currentBlock, block);
// We make sure to reset the cursor position to the new block as calling
// `updateBlock` may move it out. This generally happens when the content
// changes, or the update makes the block multi-column.
editor.setTextCursorPosition(newBlock);
} else {
newBlock = editor.insertBlocks([block], currentBlock, "after")[0];
editor.setTextCursorPosition(editor.getTextCursorPosition().nextBlock!);
}
BlockNote really is setting the selection to the next content editable block rather than the newly created one
Describe the bug
When adding a new block directly before a large one, Blocknote's view will jump to the next available text cursor position instead of staying at its current scroll position. This can be slightly annoying for users adding consecutive files or images.
Somehow, this issue does not exist if we use the slash menu, it happens only when we use the '+' button
To Reproduce
Misc
Comments.Threads.-.BlockNote.-.Google.Chrome.2025-03-25.15-04-48.mp4
The text was updated successfully, but these errors were encountered: