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
{{ message }}
Repository navigation
block-draggable caused error when hover over an element #4812
The error happens because getNodes is undefined, which usually means the BlockSelectionPlugin is missing from your editor's plugins array or not initialized correctly. Make sure you add BlockSelectionPlugin (or the BlockSelectionKit) to your plugins when creating the editor—this exposes the block selection API that block-draggable relies on. See the setup guide here: BlockSelectionPlugin setup.
Also, onMouseDown should not be triggered by hover. If it's firing on hover, check your event bindings in block-draggable.tsx to ensure onMouseDown isn't being called from onMouseEnter or onMouseOver by mistake. This could be a misconfiguration or a bug in how the handlers are wired up.
For drag-and-drop to work, confirm you have @platejs/dnd, react-dnd, and react-dnd-html5-backend installed, DndPlugin added to plugins, and your editor wrapped in a DndProvider using the HTML5 backend. If you use BlockMenuKit, it already includes BlockSelectionPlugin for you.
If you fix the plugin setup and event bindings, the error should go away. If not, double-check the implementation of block-draggable.tsx for any incorrect event handler assignments.
Activity
dosubot commentedon Jan 13, 2026
The error happens because getNodes is undefined, which usually means the BlockSelectionPlugin is missing from your editor's plugins array or not initialized correctly. Make sure you add BlockSelectionPlugin (or the BlockSelectionKit) to your plugins when creating the editor—this exposes the block selection API that block-draggable relies on. See the setup guide here: BlockSelectionPlugin setup.
Also, onMouseDown should not be triggered by hover. If it's firing on hover, check your event bindings in block-draggable.tsx to ensure onMouseDown isn't being called from onMouseEnter or onMouseOver by mistake. This could be a misconfiguration or a bug in how the handlers are wired up.
For drag-and-drop to work, confirm you have @platejs/dnd, react-dnd, and react-dnd-html5-backend installed, DndPlugin added to plugins, and your editor wrapped in a DndProvider using the HTML5 backend. If you use BlockMenuKit, it already includes BlockSelectionPlugin for you.
If you fix the plugin setup and event bindings, the error should go away. If not, double-check the implementation of block-draggable.tsx for any incorrect event handler assignments.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
felixfeng33 commentedon Jan 13, 2026
Could you provide a reproduction video?