|
435 | 435 | dragEl.parentNode[expando] && dragEl.parentNode[expando]._computeIsAligned(evt); |
436 | 436 | }, |
437 | 437 |
|
438 | | - _isTrueParentSortable = function(el, target) { |
439 | | - var trueParent = target; |
440 | | - while (!trueParent[expando]) { |
441 | | - trueParent = trueParent.parentNode; |
442 | | - } |
443 | | - |
444 | | - return el === trueParent; |
445 | | - }, |
446 | | - |
447 | | - _artificalBubble = function(sortable, originalEvt, method) { |
448 | | - // Artificial IE bubbling |
449 | | - var nextParent = sortable.parentNode; |
450 | | - while (nextParent && !nextParent[expando]) { |
451 | | - nextParent = nextParent.parentNode; |
452 | | - } |
453 | | - |
454 | | - if (nextParent) { |
455 | | - nextParent[expando][method](_extend(originalEvt, { |
456 | | - artificialBubble: true |
457 | | - })); |
458 | | - } |
459 | | - }, |
460 | | - |
461 | 438 | _hideGhostForTarget = function() { |
462 | 439 | if (!supportCssPointerEvents && ghostEl) { |
463 | 440 | _css(ghostEl, 'display', 'none'); |
|
664 | 641 |
|
665 | 642 | _saveInputCheckedState(el); |
666 | 643 |
|
667 | | - |
668 | | - // IE: Calls events in capture mode if event element is nested. This ensures only correct element's _onTapStart goes through. |
669 | | - // This process is also done in _onDragOver |
670 | | - if (IE11OrLess && !evt.artificialBubble && !_isTrueParentSortable(el, target)) { |
671 | | - return; |
672 | | - } |
673 | | - |
674 | 644 | // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. |
675 | 645 | if (dragEl) { |
676 | 646 | return; |
|
687 | 657 |
|
688 | 658 | target = _closest(target, options.draggable, el, false); |
689 | 659 |
|
690 | | - if (!target) { |
691 | | - if (IE11OrLess) { |
692 | | - _artificalBubble(el, evt, '_onTapStart'); |
693 | | - } |
694 | | - return; |
695 | | - } |
696 | 660 |
|
697 | 661 | if (lastDownEl === target) { |
698 | 662 | // Ignoring duplicate `down` |
|
1181 | 1145 |
|
1182 | 1146 | if (_silent) return; |
1183 | 1147 |
|
1184 | | - // IE event order fix |
1185 | | - if (IE11OrLess && !evt.rootEl && !evt.artificialBubble && !_isTrueParentSortable(el, target)) { |
1186 | | - return; |
1187 | | - } |
1188 | | - |
1189 | 1148 | // Return invocation when dragEl is inserted (or completed) |
1190 | 1149 | function completed(insertion) { |
1191 | 1150 | if (insertion) { |
|
1408 | 1367 | } |
1409 | 1368 | } |
1410 | 1369 |
|
1411 | | - if (IE11OrLess && !evt.rootEl) { |
1412 | | - _artificalBubble(el, evt, '_onDragOver'); |
1413 | | - } |
1414 | | - |
1415 | 1370 | return false; |
1416 | 1371 | }, |
1417 | 1372 |
|
|
1834 | 1789 |
|
1835 | 1790 |
|
1836 | 1791 | function _on(el, event, fn) { |
1837 | | - el.addEventListener(event, fn, captureMode); |
| 1792 | + el.addEventListener(event, fn, IE11OrLess ? false : captureMode); |
1838 | 1793 | } |
1839 | 1794 |
|
1840 | 1795 |
|
1841 | 1796 | function _off(el, event, fn) { |
1842 | | - el.removeEventListener(event, fn, captureMode); |
| 1797 | + el.removeEventListener(event, fn, IE11OrLess ? false : captureMode); |
1843 | 1798 | } |
1844 | 1799 |
|
1845 | 1800 |
|
|
0 commit comments