Modify ↓
Ticket #7968 (closed bug: invalid)
Can't specify false as .bind() eventData parameter
| Reported by: | frizz | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | event | Version: | 1.4.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
The false gets picked up as the new return false handler shortcut and the handler parameter is ignored.
Super-simple example here. Should open alert, but doesn't. Works in jQuery 1.4.2.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a test case!
This is no bug in jQuery but a misunderstanding on how the eventData parameter to the .bind() method can be used. The bind() documentation says:
From this it should become apparent that the eventData parameter needs to be a map of data and thus can not be a primitive value like false.
This live test case shows a usage of the eventData parameter which follows the documentation and works as expected.