Ticket #13993 (closed bug: fixed)
.triggerHandler doesn't return value from handler for DOM0 events
|Reported by:||onovy||Owned by:||dmethvin|
According to documentation ( http://api.jquery.com/triggerHandler/) .triggerHandler should return value returned by event handler:
Instead of returning the jQuery object (to allow chaining), .triggerHandler() returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns undefined.
But when you add event handler using DOM0 method (onXY attribute), .triggerHandler returns 'undefined' everytime. Doesn't matter what you return from handler function.
Tested in browsers: Chrome/Firefox
jQuery version: 1.10 / 1.10.1
Test case: http://jsbin.com/atofap/3/edit
In console is:
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to event
- Milestone changed from None to 1.11/2.1
- Owner set to dmethvin
- Status changed from open to assigned