Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8905 closed bug (invalid)

jQuery manipulates data provided to a custom event

Reported by: office@… Owned by: office@…
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/

Change History (4)

comment:1 Changed 8 years ago by timmywil

Component: unfiledevent
Owner: set to office@…
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.

comment:2 Changed 8 years ago by office@…

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/

comment:3 Changed 8 years ago by timmywil

Resolution: invalid
Status: newclosed

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

http://api.jquery.com/trigger

comment:4 Changed 8 years ago by office@…

"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.

Note: See TracTickets for help on using tickets.