Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack

This commit is contained in:
jzaefferer
2010-07-30 14:26:58 +02:00
parent b3940d2f78
commit ea58cd5ac0
8 changed files with 39 additions and 8 deletions

View File

@@ -311,7 +311,7 @@ $.widget( "ui.autocomplete", {
},
widget: function() {
return this.menu.element;
return this.element.pushStack(this.menu.element.get());
}
});

View File

@@ -210,7 +210,7 @@ $.widget( "ui.button", {
},
widget: function() {
return this.buttonElement;
return this.element.pushStack(this.buttonElement.get());
},
destroy: function() {

View File

@@ -207,7 +207,7 @@ $.widget("ui.dialog", {
},
widget: function() {
return this.uiDialog;
return this.element.pushStack(this.uiDialog.get());
},
close: function(event) {

View File

@@ -160,7 +160,7 @@ $.Widget.prototype = {
},
widget: function() {
return this.element;
return this.element.pushStack(this.element.get());
},
option: function( key, value ) {