#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: | ||
Blocked by: | Blocking: |
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 (2)
comment:1 Changed 12 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 12 years ago by
Thanks for the correction. Looks like I've been using bind() incorrectly for a while now, and it only became a problem after I upgraded from 1.3.2.
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 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 likefalse
. This live test case shows a usage of theeventData
parameter which follows the documentation and works as expected.