Skip to main content

Bug Tracker

Side navigation

#10576 closed bug (fixed)

Opened October 25, 2011 04:38PM UTC

Closed October 26, 2011 08:04PM UTC

Last modified October 26, 2011 08:08PM UTC

jQuery1.7rc1 and jQueryMobile1.0rc2 - IE gets error in jqm triggerCustomEvent method

Reported by: mmcgrath@neteffectservices.com Owned by: dmethvin
Priority: blocker Milestone: 1.7
Component: event Version: 1.7rc1
Keywords: Cc:
Blocked by: Blocking:
Description

I'm using jqm 1.0rc2 and jquery1.7rc1

Switched from jQuery 1.6.1 to 1.7rc1, and IE started throwing "SCRIPT5007: Unable to get the value of the property 'call': object is null or undefined".

A small bit of debugging led me to jQueryMobile's "triggerCustomEvent" method:

function triggerCustomEvent( obj, eventType, event ) {
  var originalType = event.type;
  event.type = eventType;
  $.event.handle.call( obj, event );
  event.type = originalType;
}

It looks like the problem is $.event doesn't have an object 'handle'.

Examples:

jQueryMobile1.0rc2 & jQuery1.6.1

http://jsbin.com/imehat/5

jQueryMobile1.0rc2 & jQuery1.7rc1

http://jsbin.com/imehat/4

(I submitted the ticket here rather than in jqueryMobile because all I changed was jQuery, and the error showed up...)

Attachments (0)
Change History (6)

Changed October 25, 2011 04:48PM UTC by rwaldron comment:1

component: unfiledevent
milestone: None1.7
owner: → mmcgrath@neteffectservices.com
priority: undecidedhigh
status: newpending

It's possible that the jQuery Mobile team hasn't update to support jQuery 1.7rc1 (release _candidate_ 1). Can you confirm their release notes?

Changed October 25, 2011 05:34PM UTC by addyosmani comment:2

@rwaldron The jQM team are currently recommending the use of 1.0RC2 with 1.6.4 as opposed to 1.7RC1. I don't believe they've updated support to cover this release just yet.

Changed October 25, 2011 05:38PM UTC by rwaldron comment:3

Thanks Addy. I'll leave this open for now - it might become an real issue when they get to updated.

Changed October 25, 2011 05:40PM UTC by dmethvin comment:4

owner: mmcgrath@neteffectservices.comdmethvin
priority: highblocker
status: pendingassigned

jQuery.event.handle isn't part of the documented interfaces, it's now jQuery.event.dispatch. I'll talk with the jQuery Mobile guys, it seems like this should be done with jQuery.fn.triggerHandler or perhaps jQuery.event.simulate which is new to 1.7. We'll work something out.

Changed October 26, 2011 08:04PM UTC by Dave Methvin comment:5

resolution: → fixed
status: assignedclosed

Fix #10576. Add alias for jQuery.event.handle so voyeur code still works.

Between new 1.7 special event hooks and jQuery.event.simulate() we have a much cleaner solution than the people calling jQuery.event.handle are doing, but we shouldn't break their use of this undocumented internal interface for now.

Changeset: 35bc30cd87c0578359c3127033dd85e1af132f69

Changed October 26, 2011 08:08PM UTC by dmethvin comment:6

#10583 is a duplicate of this ticket.