Skip to content

Commit 6993cfc

Browse files
committed
deal with common issue when used with Sortable (fix vuejs#2145)
1 parent 18eab68 commit 6993cfc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/directives/public/for.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@ const vFor = {
358358
*/
359359

360360
move: function (frag, prevEl) {
361+
// fix a common issue with Sortable:
362+
// if prevEl doesn't have nextSibling, this means it's
363+
// been dragged after the end anchor. Just re-position
364+
// the end anchor to the end of the container.
365+
if (!prevEl.nextSibling) {
366+
this.end.parentNode.appendChild(this.end)
367+
}
361368
frag.before(prevEl.nextSibling, false)
362369
},
363370

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy