diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-03-22 14:35:18 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-03-22 14:35:18 -0400 |
commit | f77224055a65f8343cd53411608a95d98db97138 (patch) | |
tree | 49aef8eb9174f45659bd682a1e736f41282629ea /ui/jquery.ui.widget.js | |
parent | e7991e33f3c5d20d6efdb18654859175ef5cac68 (diff) | |
download | jquery-ui-f77224055a65f8343cd53411608a95d98db97138.tar.gz jquery-ui-f77224055a65f8343cd53411608a95d98db97138.zip |
Widget: Maintain stack when a method returns a jQuery object. Fixes #5732 - Widget: Make the widget method maintain the stack.
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 6c6ba3864..7c8567ced 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -116,7 +116,9 @@ $.widget.bridge = function( name, object ) { } var methodValue = instance[ options ].apply( instance, args ); if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue; + returnValue = methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; return false; } }); |