Browse Source

Adding IE9 support for draggable elements that are not <a> or <img>

pull/13/head
mtetlow 11 years ago
parent
commit
037f2c4beb
  1. 8
      Sortable.js
  2. 2
      Sortable.min.js

8
Sortable.js

@ -93,6 +93,7 @@
_on(el, 'mousedown', this._onTapStart); _on(el, 'mousedown', this._onTapStart);
_on(el, 'touchstart', this._onTapStart); _on(el, 'touchstart', this._onTapStart);
_on(el, 'selectstart', this._onTapStart);
_on(el, 'dragover', this._onDragOver); _on(el, 'dragover', this._onDragOver);
_on(el, 'dragenter', this._onDragOver); _on(el, 'dragenter', this._onDragOver);
@ -124,6 +125,13 @@
target = _closest(target, options.draggable, el); target = _closest(target, options.draggable, el);
//IE 9 Support
if( target && evt.type == 'selectstart' ){
if( target.tagName != 'A' && target.tagName != 'IMG'){
target.dragDrop();
}
}
if( target && !dragEl && (target.parentNode === el) ){ if( target && !dragEl && (target.parentNode === el) ){
tapEvt = evt; tapEvt = evt;
target.draggable = true; target.draggable = true;

2
Sortable.min.js vendored

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