Side navigation
#14092 closed bug (notabug)
Opened July 02, 2013 10:23AM UTC
Closed July 04, 2013 08:04PM UTC
Error on triggering event on an element with no handlers.
Reported by: | lukasz.chelmicki@gmail.com | Owned by: | lukasz.chelmicki@gmail.com |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
on line 4691 there is :
4688: event.data = handleObj.data; 4689: event.handleObj = handleObj; 4690: 4691: ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) 4692: .apply( matched.elem, args );
In this line there is no check if handler exists. My solution to that is:
4688: event.data = handleObj.data; 4689: event.handleObj = handleObj; 4690: 4691: var tmp_handler = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ); 4692: if (typeof tmp_handler === 'function') { 4693: ret = tmp_handler.apply( matched.elem, args ); 4694: }
I noticed this in version 1.7.2 but it exists in all version up to date.
Attachments (0)
Change History (5)
Changed July 02, 2013 12:41PM UTC by comment:1
owner: | → lukasz.chelmicki@gmail.com |
---|---|
status: | new → pending |
Changed July 02, 2013 06:31PM UTC by comment:2
status: | pending → new |
---|
Replying to [comment:1 dmethvin]:
Do you have an example of code that causes an error? Please create one in jsfiddle.
I'll give an example tomorrow at work.
Changed July 04, 2013 04:59PM UTC by comment:3
status: | new → pending |
---|
Changed July 04, 2013 07:30PM UTC by comment:4
status: | pending → new |
---|
I tried to reproduce this bug. but it may have been the result of too many recursions. I was passing events between two windows.
You can reject this ticket.
Changed July 04, 2013 08:04PM UTC by comment:5
resolution: | → notabug |
---|---|
status: | new → closed |
Thanks for looking into it further.
Do you have an example of code that causes an error? Please create one in jsfiddle.