Browse Source

Merge pull request #1200 from elo7/shadow-root

Fix touch event listener when element is inside a Shadow DOM
pull/1181/merge
Lebedev Konstantin 7 years ago committed by GitHub
parent
commit
2600dc6b50
  1. 11
      Sortable.js
  2. 3
      Sortable.min.js

11
Sortable.js

@ -526,9 +526,14 @@
_css(ghostEl, 'display', 'none'); _css(ghostEl, 'display', 'none');
} }
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY), var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
parent = target, var parent = target;
i = touchDragOverListeners.length; var i = touchDragOverListeners.length;
if (target && target.shadowRoot) {
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
parent = target;
}
if (parent) { if (parent) {
do { do {

3
Sortable.min.js vendored

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