Skip to main content

Bug Tracker

Side navigation

#9840 closed bug (invalid)

Opened July 15, 2011 07:41PM UTC

Closed July 15, 2011 08:51PM UTC

Last modified July 18, 2011 07:08PM UTC

Event srcElement null in Firefox

Reported by: Owned by:
Priority: low Milestone:
Component: event Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Problem: The srcElement of a click event is null in Firefox.

Expected: srcElement has a value of the element that was clicked.

Workaround: The target property presents as expected.

jQuery Versions tested:

Browsers tested: Chrome, IE9, FF 4/Mac, FF 5 (Win & Mac). Failes on all Firefox configurations tested, works on all non-Firefox configurations tested.

Also tested fiddle: (more akin to my original code, but the issue exists in the first, simpler, jsfiddle code)

Attachments (0)
Change History (3)

Changed July 15, 2011 08:51PM UTC by timmywil comment:1

component: unfiledevent
priority: undecidedlow
resolution: → invalid
status: newclosed

The event object along with properties jQuery supports is passed to callbacks. In other words, the event object may contain properties which jQuery does not guarantee are compatible across browsers. This is such a case.

See for all of the supported event object properties.

Changed July 15, 2011 09:02PM UTC by dmethvin comment:2

Changed July 18, 2011 07:08PM UTC by jeffreypriebe comment:3

Thanks for the clarity. I didn't realize that it wasn't a "jQuery property" but rather dependent on the browser. Makes complete sense.