Skip to main content

Search and Top Navigation

#8598 closed bug (worksforme)

Opened September 25, 2012 05:43PM UTC

Closed September 25, 2012 05:55PM UTC

Last modified September 25, 2012 11:49PM UTC

Bridge function always returns false or this in jquery.ui.widget.js.

Reported by: ABrel Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.widget Version: 1.8.23
Keywords: Cc:
Blocked by: Blocking:
Description

Please,look in jquery.ui.widget.js at $.widget.bridge function and the following code inside it:

if ( methodValue !== instance && methodValue !== undefined ) {

returnValue = methodValue;

return false;

}

That code makes any function call to widget through bridge to return false or this(instance).

I suggest to return returnValue instead of false or comment out the return here.

Attachments (0)
Change History (3)

Changed September 25, 2012 05:55PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

This is just not true. The return value that you're looking at is inside a .each() callback. The actual return value is at the end of the function and is working just fine.

Changed September 25, 2012 10:28PM UTC by ABrel comment:2

Please, take a look at lines 118-120. It sets the retrunValue=methodValue and then just returns false that make absolutely no sense!

Changed September 25, 2012 11:49PM UTC by scottgonzalez comment:3

What makes absolutely no sense is you ignoring what I wrote and assuming behavior of code without actually verifying. As I said earlier, that return statement is inside a .each() callback. It's breaking the loop. Please provide code that shows this is broken if you're convinced that this is wrong.