Browse Source

added ability to use a handle that is in a shadow dom

pull/943/head
Aaron Job 8 years ago
parent
commit
6d2d56d442
  1. 23
      Sortable.js
  2. 2
      Sortable.min.js

23
Sortable.js

@ -262,9 +262,17 @@
type = evt.type,
touch = evt.touches && evt.touches[0],
target = (touch || evt).target,
originalTarget = target,
filter = options.filter;
var originalTarget;
if (evt.target.shadowRoot !== null)
{
originalTarget = path[0];
}
else
{
originalTarget = target;
}
if (type === 'mousedown' && evt.button !== 0 || options.disabled) {
return; // only left button or enabled
@ -1002,14 +1010,25 @@
) {
return el;
}
if ('host' in el)
{
el = el.host;
}
else
{
el = el.parentNode;
}
while (el !== ctx && (el = el.parentNode));
}
while (el !== ctx && el);
}
return null;
}
function _globalDragOver(/**Event*/evt) {
if (evt.dataTransfer) {
evt.dataTransfer.dropEffect = 'move';

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save