@ -307,7 +307,7 @@
type = evt . type ,
type = evt . type ,
touch = evt . touches && evt . touches [ 0 ] ,
touch = evt . touches && evt . touches [ 0 ] ,
target = ( touch || evt ) . target ,
target = ( touch || evt ) . target ,
originalTarget = target ,
originalTarget = evt . target . shadowRoot && evt . path [ 0 ] || target ,
filter = options . filter ,
filter = options . filter ,
startIndex ;
startIndex ;
@ -320,13 +320,13 @@
return ; // only left button or enabled
return ; // only left button or enabled
}
}
target = _closest ( target , options . draggable , el ) ;
if ( options . handle && ! _closest ( originalTarget , options . handle , el ) ) {
if ( ! target ) {
return ;
return ;
}
}
if ( options . handle && ! _closest ( originalTarget , options . handle , el ) ) {
target = _closest ( target , options . draggable , el ) ;
if ( ! target ) {
return ;
return ;
}
}
@ -641,6 +641,7 @@
var el = this . el ,
var el = this . el ,
target ,
target ,
dragRect ,
dragRect ,
targetRect ,
revert ,
revert ,
options = this . options ,
options = this . options ,
group = options . group ,
group = options . group ,
@ -721,9 +722,9 @@
lastParentCSS = _css ( target . parentNode ) ;
lastParentCSS = _css ( target . parentNode ) ;
}
}
targetRect = target . getBoundingClientRect ( ) ;
var targetRect = target . getBoundingClientRect ( ) ,
var width = targetRect . right - targetRect . left ,
width = targetRect . right - targetRect . left ,
height = targetRect . bottom - targetRect . top ,
height = targetRect . bottom - targetRect . top ,
floating = /left|right|inline/ . test ( lastCSS . cssFloat + lastCSS . display )
floating = /left|right|inline/ . test ( lastCSS . cssFloat + lastCSS . display )
|| ( lastParentCSS . display == 'flex' && lastParentCSS [ 'flex-direction' ] . indexOf ( 'row' ) === 0 ) ,
|| ( lastParentCSS . display == 'flex' && lastParentCSS [ 'flex-direction' ] . indexOf ( 'row' ) === 0 ) ,
@ -1075,14 +1076,21 @@
if ( ( selector === '>*' && el . parentNode === ctx ) || _matches ( el , selector ) ) {
if ( ( selector === '>*' && el . parentNode === ctx ) || _matches ( el , selector ) ) {
return el ;
return el ;
}
}
}
/* jshint boss:true */
while ( el !== ctx && ( el = el . parentNode ) ) ;
} while ( el = _getParentOrHost ( el ) ) ;
}
}
return null ;
return null ;
}
}
function _getParentOrHost ( el ) {
var parent = el . host ;
return ( parent && parent . nodeType ) ? parent : el . parentNode ;
}
function _globalDragOver ( /**Event*/ evt ) {
function _globalDragOver ( /**Event*/ evt ) {
if ( evt . dataTransfer ) {
if ( evt . dataTransfer ) {
evt . dataTransfer . dropEffect = 'move' ;
evt . dataTransfer . dropEffect = 'move' ;