提交 d373ea05 编写于 作者: O owen-m1

#1434: Target must be immediate child of sortable

上级 aca3a25d
......@@ -501,7 +501,7 @@
scrollSensitivity: 30,
scrollSpeed: 10,
bubbleScroll: true,
draggable: /[uo]l/i.test(el.nodeName) ? 'li' : '>*',
draggable: /[uo]l/i.test(el.nodeName) ? '>li' : '>*',
swapThreshold: 1, // percentage; 0 <= x <= 1
invertSwap: false, // invert always
invertedSwapThreshold: null, // will be set to same as swapThreshold if default
......@@ -1210,7 +1210,7 @@
return completed();
}
}
else if (target && target !== dragEl && (target.parentNode[expando] !== void 0) && target !== el) {
else if (target && target !== dragEl && target.parentNode === el) {
var direction = 0,
targetBeforeFirstSwap,
aligned = target.sortableMouseAligned,
......@@ -1691,7 +1691,14 @@
ctx = ctx || document;
do {
if ((selector === '>*' && el.parentNode === ctx) || _matches(el, selector) || (includeCTX && el === ctx)) {
if (
selector != null &&
(
selector[0] === '>' && el.parentNode === ctx && _matches(el, selector.substring(1)) ||
_matches(el, selector) ||
(includeCTX && el === ctx)
)
) {
return el;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册