-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Dialog: When destroy is called place the element back in original DOM position. Fixed #4980 - Dialog: Destroy should place element back in original DOM position #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -78,6 +78,8 @@ $.widget("ui.dialog", { | |||
if ( typeof this.originalTitle !== "string" ) { | |||
this.originalTitle = ""; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No spaces on blank lines.
Can you add a test for this? |
I will add a test and make the changes |
Thanks. |
Commit changed, I guess thats ok. |
@@ -168,7 +171,7 @@ $.widget("ui.dialog", { | |||
}, | |||
|
|||
_destroy: function() { | |||
var self = this; | |||
var self = this, oldPosition = this.oldPosition, next = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate line for each var
Commit changed |
@@ -183,6 +188,13 @@ $.widget("ui.dialog", { | |||
if ( self.originalTitle ) { | |||
self.element.attr( "title", self.originalTitle ); | |||
} | |||
|
|||
next = oldPosition.parent.children().eq( oldPosition.index ); | |||
if( next.length ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (
(space)
Thanks Alberto. Just two minor changes and we're good to go. Thanks for making all the changes so quickly and providing a better solution than what we had planned. |
… position. Fixed #4980 - Dialog: Destroy should place element back in original DOM position
Thanks Scott, it was a pleasure to contribute to improving the jQuery UI |
Dialog: When destroy is called place the element back in original DOM position. Fixed #4980 - Dialog: Destroy should place element back in original DOM position
Merged! Thanks again. |
Dialog: When destroy is called place the element back in original DOM position. Fixed #4980 - Dialog: Destroy should place element back in original DOM position