mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Don't try to place the dialog next to itself on destroy. Fixes #8613 - Destroying a dialog removes the original element from the DOM.
This commit is contained in:
parent
9b0c8b7041
commit
4ab4684cfc
3
ui/jquery.ui.dialog.js
vendored
3
ui/jquery.ui.dialog.js
vendored
@ -216,7 +216,8 @@ $.widget("ui.dialog", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
next = oldPosition.parent.children().eq( oldPosition.index );
|
next = oldPosition.parent.children().eq( oldPosition.index );
|
||||||
if ( next.length ) {
|
// Don't try to place the dialog next to itself (#8613)
|
||||||
|
if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
|
||||||
next.before( this.element );
|
next.before( this.element );
|
||||||
} else {
|
} else {
|
||||||
oldPosition.parent.append( this.element );
|
oldPosition.parent.append( this.element );
|
||||||
|
Loading…
Reference in New Issue
Block a user