Skip to content

Commit 2486a3b

Browse files
committed
handle v-for anchor position when moved by external lib (fix #2745)
1 parent c636a03 commit 2486a3b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/directives/public/for.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,14 @@ const vFor = {
332332
})
333333
setTimeout(op, staggerAmount)
334334
} else {
335-
frag.before(prevEl.nextSibling)
335+
var target = prevEl.nextSibling
336+
if (!target) {
337+
// reset end anchor position in case the position was messed up
338+
// by an external drag-n-drop library.
339+
after(this.end, prevEl)
340+
target = this.end
341+
}
342+
frag.before(target)
336343
}
337344
},
338345

0 commit comments

Comments
 (0)