Bug Tracker

Modify

Ticket #8905 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by timmywil

  • Owner set to office@…
  • Priority changed from undecided to high
  • Status changed from new to pending
  • Component changed from unfiled to event

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 2 years ago by office@…

  • Status changed from pending to new

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 2 years ago by timmywil

  • Status changed from new to closed
  • Resolution set to invalid

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

 http://api.jquery.com/trigger

comment:4 Changed 2 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.