Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8598 closed bug (worksforme)

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:


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.

Change History (3)

comment:1 Changed 10 years ago by Scott González

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.

comment:2 Changed 10 years ago by ABrel

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

comment:3 Changed 10 years ago by Scott González

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.

Note: See TracTickets for help on using tickets.