Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1701 closed defect (fixed)

dojo.event.browser.isEvent() doesn't check for null obj

Reported by: tim@… Owned by: alex
Priority: high Milestone:
Component: Events Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.event.browser.isEvent() has the code:

return (typeof obj != "undefined")&&(typeof Event != "undefined")&&(obj.eventPhase);

Apparently, obj can be null in certain situations, so the code should be:

return (typeof obj != "undefined")&&(typeof Event != "undefined")&&(obj)&&(obj.eventPhase);

That is, it should verify that obj is not null before trying to access its properties.

Change History (3)

comment:1 Changed 13 years ago by alex

Milestone: 0.4.1
Status: newassigned

comment:2 Changed 13 years ago by alex

Resolution: fixed
Status: assignedclosed

(In [6718]) fixes #1701

comment:3 Changed 12 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.