Opened 13 years ago
Closed 13 years ago
#6507 closed bug (invalid)
[this] gets mangled when passed through trigger, for submit events
Reported by: | ekhaled | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | event | Version: | 1.4.2 |
Keywords: | bind, trigger | Cc: | |
Blocked by: | Blocking: |
Description
In an event handler bound for the "submit" event, [this] is the form element itself, but when [this] is passed through .trigger() using:
$("anotherElement").trigger("customeEvent",this)
[this] becomes the button element that was clicked to trigger the submit event
Test case: http://jsbin.com/atowo3/3/edit
Tested in firefox 3.5 on linux and 3.6 on mac
Note: See
TracTickets for help on using
tickets.
The docs say the second element should be an array:
http://api.jquery.com/trigger/