Side navigation
#11112 closed bug (invalid)
Opened December 28, 2011 04:46PM UTC
Closed December 28, 2011 05:07PM UTC
Last modified December 28, 2011 06:44PM UTC
Uncaught TypeError: Cannot read property 'disabled' of undefined
Reported by: | rwaldron | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | event | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I've been frequently encountering this...
Uncaught TypeError: Cannot read property 'disabled' of undefined jQuery.event.dispatch (jquery.js:3206) triggerCustomEvent (jquery.mobile-1.0.js:1006) (anonymous function) (jquery.mobile-1.0.js:1089)
Line 3206:
if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
Attachments (0)
Change History (6)
Changed December 28, 2011 04:47PM UTC by comment:1
component: | unfiled → event |
---|---|
priority: | undecided → low |
Changed December 28, 2011 04:50PM UTC by comment:2
_comment0: | I'm → 1325091102319462 |
---|---|
description: | I've been frequently encountering this... \ \ {{{ \ Uncaught TypeError: Cannot read property 'disabled' of undefined \ \ jQuery.event.dispatchjquery.js:3206 \ triggerCustomEventjquery.mobile-1.0.js:1006 \ (anonymous function)jquery.mobile-1.0.js:1089 \ \ }}} \ \ \ Line 3206: \ \ {{{ \ if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { \ }}} → I've been frequently encountering this... \ \ {{{ \ Uncaught TypeError: Cannot read property 'disabled' of undefined \ \ jQuery.event.dispatch (jquery.js:3206) \ triggerCustomEvent (jquery.mobile-1.0.js:1006) \ (anonymous function) (jquery.mobile-1.0.js:1089) \ \ }}} \ \ \ Line 3206: \ \ {{{ \ if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { \ }}} |
I'll try to put together a test case, but I'm not sure what causes this yet.
Changed December 28, 2011 05:04PM UTC by comment:3
It would be caused if the event.target
is undefined, but that shouldn't happen if the event is properly jQuery.event.fix()
ed and/or it goes through .trigger()
. I thought jQuery Mobile 1.0 specified 1.6.4 anyway?
Changed December 28, 2011 05:07PM UTC by comment:4
resolution: | → invalid |
---|---|
status: | new → closed |
Yes it does require 1.6.4 at the moment, the dev build may work with 1.7.1 though.
http://jquerymobile.com/blog/2011/11/16/announcing-jquery-mobile-1-0/
Changed December 28, 2011 06:11PM UTC by comment:5
Replying to [comment:3 dmethvin]:
It would be caused if theevent.target
is undefined, but that shouldn't happen if the event is properlyjQuery.event.fix()
ed and/or it goes through.trigger()
. I thought jQuery Mobile 1.0 specified 1.6.4 anyway?
That much was clear, I was trying to identify "what happens" that leaves the event.target
undefined.
Changed December 28, 2011 06:44PM UTC by comment:6
In jquery.mobile.event.js:
function triggerCustomEvent( obj, eventType, event ) { var originalType = event.type; event.type = eventType; $.event.handle.call( obj, event ); event.type = originalType; }
Then later:
triggerCustomEvent( thisObject, "taphold", $.Event( "taphold" ) );
The created Event object doesn't have a target, but there's already a ticket for this bug in Mobile: https://github.com/jquery/jquery-mobile/issues/2569