#709·dragula

Dragging outside the boundary causes error accessing attribute on a null object

Author: ayushkamadjiCreated Jun 21, 2024Updated Dec 15, 2025

With a drag zone that overflows the browser window, when dragging an item outside the browser window, errors will appear on the console because using doc.elementFromPoint returns null. MDN doc of elementFromPoint

https://github.com/bevacqua/dragula/blob/09ab978dd550490f1f8e456551a1a39ed0d7f984/dist/dragula.js#L170-L177

and this line tries to access tagName attribute on that null object. https://github.com/bevacqua/dragula/blob/09ab978dd550490f1f8e456551a1a39ed0d7f984/dist/dragula.js#L604

https://github.com/bevacqua/dragula/assets/8255357/72e988cb-b170-4c25-b445-f9c011d888f3

=== Dragula version: 3.7.3

Please only use GitHub issues for bug reports and feature requests.