Browse Source

updated with suggestions from @RubaXa

pull/943/head
Aaron Job 8 years ago
parent
commit
1e92db51f8
  1. 22
      Sortable.js

22
Sortable.js

@ -262,18 +262,9 @@
type = evt.type, type = evt.type,
touch = evt.touches && evt.touches[0], touch = evt.touches && evt.touches[0],
target = (touch || evt).target, target = (touch || evt).target,
originalTarget = evt.target.shadowRoot && evt.path[0] || target,
filter = options.filter; filter = options.filter;
var originalTarget;
if (evt.target.shadowRoot !== null)
{
originalTarget = evt.path[0];
}
else
{
originalTarget = target;
}
if (type === 'mousedown' && evt.button !== 0 || options.disabled) { if (type === 'mousedown' && evt.button !== 0 || options.disabled) {
return; // only left button or enabled return; // only left button or enabled
} }
@ -1010,17 +1001,8 @@
) { ) {
return el; return el;
} }
if ('host' in el)
{
el = el.host;
}
else
{
el = el.parentNode;
}
} }
while (el !== ctx && el); while (el = ('host' in el) ? el.host : el.parentNode)
} }
return null; return null;

Loading…
Cancel
Save