Bug Tracker

Modify

Ticket #9840 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Event srcElement null in Firefox

Reported by: jeffreypriebe@… Owned by:
Priority: low Milestone: 1.next
Component: event Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

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.

 http://jsfiddle.net/QYU38/

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

Change History

comment:1 Changed 3 years ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to event

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  http://api.jquery.com/category/events/ for all of the supported event object properties.

comment:3 Changed 3 years ago by jeffreypriebe

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.