File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1170,6 +1170,8 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
11701170 let elLastChild = lastChild ( el , options . draggable ) ;
11711171
11721172 if ( ! elLastChild || _ghostIsLast ( evt , vertical , this ) && ! elLastChild . animated ) {
1173+ // Insert to end of list
1174+
11731175 // If already at end of list: Do not insert
11741176 if ( elLastChild === dragEl ) {
11751177 return completed ( false ) ;
@@ -1194,6 +1196,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
11941196 }
11951197 }
11961198 else if ( elLastChild && _ghostIsFirst ( evt , vertical , this ) ) {
1199+ // Insert to start of list
11971200 let firstChild = getChild ( el , 0 , options , true ) ;
11981201 if ( firstChild === dragEl ) {
11991202 return completed ( false ) ;
@@ -1780,7 +1783,7 @@ function _unsilent() {
17801783}
17811784
17821785function _ghostIsFirst ( evt , vertical , sortable ) {
1783- let rect = getRect ( getChild ( sortable . el , 0 , sortable . options ) ) ;
1786+ let rect = getRect ( getChild ( sortable . el , 0 , sortable . options , true ) ) ;
17841787 const spacer = 10 ;
17851788
17861789 return vertical ?
You can’t perform that action at this time.
0 commit comments