nathancahill / split

Unopinionated utilities for resizeable split views
https://split.js.org/
MIT License
6.1k stars 448 forks source link

Split.js: drag is not stopped before destroy #790

Open jdospina95 opened 1 year ago

jdospina95 commented 1 year ago

When you are dragging the gutter and the split gets destroyed you can continue to drag and it breaks the layout. The dragging should be stopped before destroying it, it does not make sense to allow users to keep dragging the gutter if it does not exist anymore. I have prepared a codepen to reproduce the issue, it will destroy the split after 5 seconds so just drag it around (keeping the mouse clicked) until the gutter disappears, and then you can continue to drag it until you let the mouse go.

destroy() should call stopDragging()

Codepen