Bug Tracker

Ticket #9285 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

custom trigger

Reported by: anonymous Owned by: rwaldron
Priority: low Milestone: 1.6.2
Component: event Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

$("#orderproduct").live('fill', function (e, i){

alert(i);

});

$("#orderproduct").trigger('fill', 0);

result: undefined (not 0)!!!

Change History

comment:1 Changed 3 years ago by addyosmani

  • Owner set to anonymous
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to event

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on  http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket!

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 3 years ago by rwaldron

  • Owner changed from anonymous to rwaldron
  • Status changed from pending to assigned

comment:4 Changed 3 years ago by timmywil

  • Milestone changed from 1.next to 1.6.2

comment:5 Changed 3 years ago by Rick Waldron

  • Status changed from assigned to closed
  • Resolution set to fixed

Landing pull request 377. Check custom data != null(undefined), allows zero; Fixes #9285.

More Details:

comment:6 Changed 3 years ago by dmethvin

  • Keywords needsdocs added

The docs page for .trigger() says the data arg to trigger should be "An array of additional parameters to pass along to the event handler", but our consensus is that other things (particularly Objects) should be valid as well.

comment:7 Changed 3 years ago by rwaldron

+1

comment:8 Changed 3 years ago by dmethvin

  • Keywords needsdocs removed

comment:9 Changed 3 years ago by timmywil

#9421 is a duplicate of this ticket.

comment:10 Changed 3 years ago by rwaldron

#9511 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.