Skip to content

Commit 96977ed

Browse files
committed
Use pushStack in tooltip's widget method. See #5732
1 parent 52c3165 commit 96977ed

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/unit/tooltip/tooltip_methods.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@ test("open", function() {
2020
$(":ui-tooltip").tooltip("destroy");
2121
});
2222

23+
test("widget", function() {
24+
var tooltip = $("#tooltipped1").tooltip();
25+
same(tooltip.tooltip("widget")[0], $(".ui-tooltip")[0]);
26+
same(tooltip.tooltip("widget").end()[0], tooltip[0]);
27+
});
28+
29+
2330
})(jQuery);

ui/jquery.ui.tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $.widget("ui.tooltip", {
7070
},
7171

7272
widget: function() {
73-
return this.tooltip;
73+
return this.element.pushStack(this.tooltip.get());
7474
},
7575

7676
open: function(event) {

0 commit comments

Comments
 (0)