Skip to main content

Bug Tracker

Side navigation

#6507 closed bug (invalid)

Opened May 01, 2010 02:06AM UTC

Closed August 26, 2010 01:18AM UTC

[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

Attachments (0)
Change History (1)

Changed August 26, 2010 01:18AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

The docs say the second element should be an array:

http://api.jquery.com/trigger/