From 58ae7ce2fd20fb865c9087fb2eae0dbdb39fc9a7 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 30 Jul 2010 12:38:18 -0400 Subject: Revert "Use pushStack in widget method. Fixes #5732 - make the widget method maintain the stack" This reverts commit ea58cd5ac0d852a9c7d7ceadbcbb74006cf9052d. --- tests/unit/widget/widget_core.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/unit/widget') diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index 52c91d51e..3c870f1fe 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -151,8 +151,7 @@ test(".widget() - base", function() { _create: function() {} }); var div = $("
").testWidget() - same(div.testWidget("widget")[0], div[0]); - same(div.testWidget("widget").end()[0], div[0]); + same(div[0], div.testWidget("widget")[0]); }); test(".widget() - overriden", function() { @@ -160,12 +159,10 @@ test(".widget() - overriden", function() { $.widget("ui.testWidget", { _create: function() {}, widget: function() { - return this.element.pushStack(wrapper.get()); + return wrapper; } }); - var div = $("
").testWidget(); - same(div.testWidget("widget")[0], wrapper[0]); - same(div.testWidget("widget").end()[0], div[0]); + same(wrapper[0], $("
").testWidget().testWidget("widget")[0]); }); })(jQuery); -- cgit v1.2.3