Side navigation
#9571 closed bug (worksforme)
Opened June 13, 2011 07:41AM UTC
Closed June 13, 2011 02:16PM UTC
Last modified June 13, 2011 08:52PM UTC
Pass 'empty string' as arbitrary data with , trigger()
Reported by: | soderslatt@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | event | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
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) { console.log(a); console.log(b); } ).trigger("click", ''); });
Attachments (0)
Change History (3)
Changed June 13, 2011 07:45AM UTC by comment:1
Changed June 13, 2011 02:16PM UTC by comment:2
component: | unfiled → event |
---|---|
priority: | undecided → low |
resolution: | → worksforme |
status: | new → closed |
This works for me: http://jsfiddle.net/NE8ma/1/
Changed June 13, 2011 08:52PM UTC by comment:3
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).
sorry, it's my first report, jsfiddle below:
http://jsfiddle.net/HPvfg/
http://jsfiddle.net/HPvfg/1/