fix click event for mobile devices and old browser
added forcePolyfill option.
forcePolyfill is made to make cross-browser testing more easy.
forcePolyfill provides a reliable, consistent cross-browser Solution for
Sortable.
forcePolyfill gives us the possibility to change the way "dragged items"
lok like.
@ -65,6 +65,13 @@ var sortable = new Sortable(el, {
ghostClass: "sortable-ghost", // Class name for the drop placeholder
ghostClass: "sortable-ghost", // Class name for the drop placeholder
dataIdAttr: 'data-id',
dataIdAttr: 'data-id',
/*
ignore the HTML5 DnD behaviour and force the fallback to kick in
- provide a more reliable cross-browser solution
- grants the ability to display a different "dragged" element
*/
forcePolyfill: false,
scroll: true, // or HTMLElement
scroll: true, // or HTMLElement
scrollSensitivity: 30, // px, how near the mouse must be to an edge to start scrolling.
scrollSensitivity: 30, // px, how near the mouse must be to an edge to start scrolling.
scrollSpeed: 10, // px
scrollSpeed: 10, // px
@ -253,6 +260,18 @@ Sortable.create(list, {
---
---
#### `forcePolyfill` option
If set to `true`, the polyfill - or Fallback for non HTML5 Browser - will be used, even if we are using an HTML5 Browser.
This gives us the possiblity to test the behaviour for older Browsers even in newer Browser, or make the Drag 'n Drop feel more consistent between Desktop , Mobile and old Browsers.
On top of that, the polyfill always generates a copy of that DOM Element in the Document's Body. This behaviour can be exploited to give us more control over the look of this 'dragged' Element.