Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10576 closed bug (fixed)

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

Reported by: mmcgrath@… Owned by: dmethvin
Priority: blocker Milestone: 1.7
Component: event Version: 1.7rc1
Keywords: Cc:
Blocked by: Blocking:


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'.


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...)

Change History (6)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledevent
Milestone: None1.7
Owner: set to mmcgrath@…
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?

comment:2 Changed 12 years ago by addyosmani

@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.

comment:3 Changed 12 years ago by Rick Waldron

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

comment:4 Changed 12 years ago by dmethvin

Owner: changed from mmcgrath@… to dmethvin
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.

comment:5 Changed 12 years ago by Dave Methvin

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

comment:6 Changed 12 years ago by dmethvin

#10583 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.