Skip to content

Commit

Permalink
Support iOS 8.4.1 and safety IE9/10 SortableJS#532
Browse files Browse the repository at this point in the history
  • Loading branch information
shootaroo committed Sep 1, 2015
1 parent 76924ca commit 8fbcc2e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
parseInt = win.parseInt,

supportDraggable = !!('draggable' in document.createElement('div')),
supportCssPointerEvents = navigator.userAgent.indexOf('MSIE') < 0,

_silent = false,

Expand Down Expand Up @@ -411,7 +412,9 @@
this._lastX = touchEvt.clientX;
this._lastY = touchEvt.clientY;

_css(ghostEl, 'display', 'none');
if (!supportCssPointerEvents) {
_css(ghostEl, 'display', 'none');
}

var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY),
parent = target,
Expand Down Expand Up @@ -439,7 +442,9 @@
while (parent = parent.parentNode);
}

_css(ghostEl, 'display', '');
if (!supportCssPointerEvents) {
_css(ghostEl, 'display', '');
}
}
},

Expand Down Expand Up @@ -490,6 +495,10 @@
_css(ghostEl, 'position', 'fixed');
_css(ghostEl, 'zIndex', '100000');

if (supportCssPointerEvents) {
_css(ghostEl, 'pointerEvents', 'none');
}

this.options.fallbackOnBody && document.body.appendChild(ghostEl) || rootEl.appendChild(ghostEl);

// Fixing dimensions.
Expand Down

0 comments on commit 8fbcc2e

Please sign in to comment.