Skip to main content

Bug Tracker

Side navigation

#8905 closed bug (invalid)

Opened April 18, 2011 02:50PM UTC

Closed April 18, 2011 04:15PM UTC

Last modified April 18, 2011 04:26PM UTC

jQuery manipulates data provided to a custom event

Reported by: office@highresolution.info Owned by: office@highresolution.info
Priority: high Milestone: 1.next
Component: event Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery sometimes manipulates the data variable that is provided when triggering a custom event in the case, the "data" variable contains a jQuery object of a <form> element.

Result: The event handler received "wrong" information.

A testcase is provided here:

http://jsfiddle.net/djesse/rEDqP/4/

Attachments (0)
Change History (4)

Changed April 18, 2011 03:17PM UTC by timmywil comment:1

component: unfiledevent
owner: → office@highresolution.info
priority: undecidedhigh
status: newpending

Thanks for taking the time to contribute to the jQuery project! I've reviewed your test case and was unable to reproduce in Chrome 10, IE7-8, or Firefox 4. http://jsfiddle.net/timmywil/rEDqP/5/

Was there a certain browser in which you were experiencing this issue? Please update the test case to reproduce the issue so that we can review further. Additionally, test against the jQuery (edge) version to ensure the issue still exists.

Changed April 18, 2011 04:04PM UTC by office@highresolution.info comment:2

status: pendingnew

Hi,

here's a simpler version of the test case. The bug can be reproduced in FF4, Chrome 10, IE9 ...

http://jsfiddle.net/djesse/rEDqP/7/

Changed April 18, 2011 04:15PM UTC by timmywil comment:3

resolution: → invalid
status: newclosed

Oh, event data should be passed as an array: http://jsfiddle.net/timmywil/rEDqP/8/.

http://api.jquery.com/trigger

Changed April 18, 2011 04:26PM UTC by office@highresolution.info comment:4

"Oh, event data should be passed as an array" ... if so, I would expect an JavaScript error or a general misfunction (e.g. undefined data in the event handler) but the code works in general - besides this test case when passing a form element.

Anyway, thanks for clarification.