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
Implement a node that will implement the getDOMSlot() method
Add this node to the editor so that the selection is set to offset 0 on this element. This can be achieved, for example, by calling the replace() method
Add a new element to the child element of this node without changing the selection
An error occurs in the updateDOMBlockCursorElement function and the inserted node is not displayed until the selection changes
_block.cursor.error.mov
It is important to note that the error does not occur if selection is set to null or is on a different element
_block.cursor.happy.path.mov
The expected behavior
Nodes implementing the getDOMSlot method are correctly processed in updateDOMBlockCursorElement
Impact of fix
In addition to fixing the bug, it would be nice to have public documentation on the block cursor, as there is currently no mention of it other than the changelog
Lexical version: 0.44
Steps To Reproduce
getDOMSlot()methodreplace()methodLink to code example: https://codesandbox.io/p/sandbox/update-cursor-block-dcx7mp
The current behavior
An error occurs in the
updateDOMBlockCursorElementfunction and the inserted node is not displayed until the selection changes_block.cursor.error.mov
It is important to note that the error does not occur if selection is set to null or is on a different element
_block.cursor.happy.path.mov
The expected behavior
Nodes implementing the
getDOMSlotmethod are correctly processed inupdateDOMBlockCursorElementImpact of fix
In addition to fixing the bug, it would be nice to have public documentation on the block cursor, as there is currently no mention of it other than the changelog