Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9571 closed bug (worksforme)

Pass 'empty string' as arbitrary data with , trigger()

Reported by: [email protected] Owned by:
Priority: low Milestone: 1.next
Component: event Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


Sending data with trigger differs between version 1.5 and 1.6.1. I can't figure out what causes this behaviour from reading the official change log.

With 1.6.1 => undefined, undefined

With 1.5.0 => (an empty string), undefined

$(document).ready(function() {
$("p").click( function (event, a, b) {
} ).trigger("click", '');

Change History (3)

comment:2 Changed 12 years ago by timmywil

Component: unfiledevent
Priority: undecidedlow
Resolution: worksforme
Status: newclosed

This works for me: http://jsfiddle.net/NE8ma/1/

comment:3 Changed 12 years ago by dmethvin

This was a bug I introduced in 1.6 and rwaldron fixed, should be in 1.6.2 when that is released. As a workaround, specify an Array with your string, like .trigger("click", ['']) (the code converts it internally to an array if you don't supply one).

Note: See TracTickets for help on using tickets.