#11112 closed bug (invalid)
Uncaught TypeError: Cannot read property 'disabled' of undefined
Reported by: | Rick Waldron | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | event | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
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") ) {
Change History (6)
comment:1 Changed 11 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:3 follow-up: 5 Changed 11 years ago by
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?
comment:4 Changed 11 years ago by
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/
comment:5 Changed 11 years ago by
Replying to dmethvin:
It would be caused if the
event.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.
comment:6 Changed 11 years ago by
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
I'll try to put together a test case, but I'm not sure what causes this yet.