diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-04-22 21:08:18 -0400 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-04-22 21:08:38 -0400 |
commit | d8f7e8371230a6dd504ca02e65442745b6ff6ce2 (patch) | |
tree | 4bf4a2250a82d45beeebb98bcde1f2ee70ec1af7 /src/manipulation.js | |
parent | 67a080b284af50433583da05f84e73bc63814bab (diff) | |
download | jquery-d8f7e8371230a6dd504ca02e65442745b6ff6ce2.tar.gz jquery-d8f7e8371230a6dd504ca02e65442745b6ff6ce2.zip |
Fix #13810: .replaceWith(nextSibling)
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 2cc6d8e20..6204ca7c9 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -173,6 +173,10 @@ jQuery.fn.extend({ parent = args[ i++ ]; if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } jQuery( this ).remove(); parent.insertBefore( elem, next ); } |