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 */ {
1170
1170
let elLastChild = lastChild ( el , options . draggable ) ;
1171
1171
1172
1172
if ( ! elLastChild || _ghostIsLast ( evt , vertical , this ) && ! elLastChild . animated ) {
1173
+ // Insert to end of list
1174
+
1173
1175
// If already at end of list: Do not insert
1174
1176
if ( elLastChild === dragEl ) {
1175
1177
return completed ( false ) ;
@@ -1194,6 +1196,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
1194
1196
}
1195
1197
}
1196
1198
else if ( elLastChild && _ghostIsFirst ( evt , vertical , this ) ) {
1199
+ // Insert to start of list
1197
1200
let firstChild = getChild ( el , 0 , options , true ) ;
1198
1201
if ( firstChild === dragEl ) {
1199
1202
return completed ( false ) ;
@@ -1780,7 +1783,7 @@ function _unsilent() {
1780
1783
}
1781
1784
1782
1785
function _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 ) ) ;
1784
1787
const spacer = 10 ;
1785
1788
1786
1789
return vertical ?
You can’t perform that action at this time.
0 commit comments