SortableJS / Sortable

Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
https://sortablejs.github.io/Sortable/
MIT License
29.77k stars 3.71k forks source link

[bug] 未判断 dragEl.parentNode对象是否存在就访问了其属性 #2336

Open likethewindblows opened 11 months ago

likethewindblows commented 11 months ago

在1.15.0的sortablejs中的sortable.core.esm.js文件中存在未判断对象是否存在就访问其属性的问题,导致报错Cannot read properties of null (reading 'Sortable1702364076767')

1.compelted方法 1945行 dragEl.parentNode[expando]._isOutsideThisEl(evt.target); 2._checkOutsideTargetEl方法 1209行 dragEl.parentNode[expando]._isOutsideThisEl(evt.target);

期望在访问dragEl.parentNode属性时先判空dragEl.parentNode

TomDeSmet commented 8 months ago

I have this issue as well. When dragging very fast, this error makes Sortable crash.