Skip to content

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

Merged
merged 1 commit into from
Dec 15, 2011

Conversation

AlbertoMonteiro
Copy link

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

@@ -78,6 +78,8 @@ $.widget("ui.dialog", {
if ( typeof this.originalTitle !== "string" ) {
this.originalTitle = "";
}

Copy link
Member

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.

@scottgonzalez
Copy link
Member

Can you add a test for this?

@AlbertoMonteiro
Copy link
Author

I will add a test and make the changes

@scottgonzalez
Copy link
Member

Thanks.

@AlbertoMonteiro
Copy link
Author

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;
Copy link
Member

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

@AlbertoMonteiro
Copy link
Author

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 ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ( (space)

@scottgonzalez
Copy link
Member

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
@AlbertoMonteiro
Copy link
Author

Thanks Scott, it was a pleasure to contribute to improving the jQuery UI

scottgonzalez added a commit that referenced this pull request Dec 15, 2011
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
@scottgonzalez scottgonzalez merged commit 76c7bf6 into jquery:master Dec 15, 2011
@scottgonzalez
Copy link
Member

Merged! Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants