Skip to content

Commit

Permalink
Change supportCssPointerEvents strictly
Browse files Browse the repository at this point in the history
  • Loading branch information
shootaroo committed Sep 1, 2015
1 parent 8fbcc2e commit 20c2fc1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
parseInt = win.parseInt,

supportDraggable = !!('draggable' in document.createElement('div')),
supportCssPointerEvents = navigator.userAgent.indexOf('MSIE') < 0,
supportCssPointerEvents = (function (el) {
el = document.createElement('x');
el.style.cssText = 'pointer-events:auto';
return el.style.pointerEvents === 'auto';
})(),

_silent = false,

Expand Down Expand Up @@ -494,10 +498,7 @@
_css(ghostEl, 'opacity', '0.8');
_css(ghostEl, 'position', 'fixed');
_css(ghostEl, 'zIndex', '100000');

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

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

Expand Down

0 comments on commit 20c2fc1

Please sign in to comment.