File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 6060 delay : 0 ,
6161 // The css selector of the drag handle
6262 handle : "" ,
63- // The exact css path between the item and its subcontainers
63+ // The exact css path between the item and its subcontainers.
64+ // It should only match the immediate items of a container.
65+ // No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is "> div"
6466 itemPath : "" ,
6567 // The css selector of the items
6668 itemSelector : "li" ,
274276 groupDefaults . onDrag ,
275277 e )
276278
277- var x = e . pageX || e . originalEvent . pageX ,
278- y = e . pageY || e . originalEvent . pageY ,
279+ var p = this . getPointer ( e ) ,
279280 box = this . sameResultBox ,
280281 t = this . options . tolerance
281282
282- if ( ! box || box . top - t > y || box . bottom + t < y || box . left - t > x || box . right + t < x )
283+ if ( ! box || box . top - t > p . top || box . bottom + t < p . top || box . left - t > p . left || box . right + t < p . left )
283284 if ( ! this . searchValidTarget ( ) ) {
284285 this . placeholder . detach ( )
285286 this . lastAppendedItem = undefined
399400 } ,
400401 getPointer : function ( e ) {
401402 return {
402- left : e . pageX || e . originalEvent . pageX ,
403- top : e . pageY || e . originalEvent . pageY
403+ left : e . pageX || e . originalEvent . pageX || e . originalEvent . touches [ 0 ] . pageX ,
404+ top : e . pageY || e . originalEvent . pageY || e . originalEvent . touches [ 0 ] . pageY
404405 }
405406 } ,
406407 setupDelayTimer : function ( ) {
You can’t perform that action at this time.
0 commit comments