Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7534 closed bug (wontfix)

event.originalTarget no longer is passed to an event handler listening element on firefox 3.5+

Reported by: jquery@… Owned by:
Priority: blocker Milestone: 1.5
Component: event Version: 1.5
Keywords: regression Cc:
Blocked by: Blocking:

Description

When listening to events, the originalTarget property is no longer passed.

Expected; 1) Using jQuery attach an onchange event to an input element and log e.originalTarget(example below) 2) Enter content into input element to fire the change event 3) The originalTarget is reported as the originalTarget

Actual; 1) Using jQuery attach an onchange event to an input element and log e.originalTarget(example below) 2) Enter content into input element to fire the change event 3) The originalTarget is reported as undefined

	$('input').change(function(e) {
		console.log('element', e.originalTarget);
	});

This worked in jQuery 1.4.2. It also affects other event handlers attached to any.

  1. The version(s) of jQuery affected; 1.4.4
  2. The browser (or browsers) that you are able to reproduce the bug in, including version numbers. FF 3.6.12 + 4.0b7
  3. The operating system (or operating systems) you experienced the bug on. Mac OS 10.6, Snow Leopard

Change History (7)

comment:1 Changed 9 years ago by jquery@…

JSfiddle test case; http://jsfiddle.net/X8a9b/1/

comment:2 Changed 9 years ago by Rick Waldron

Component: unfiledevent
Keywords: regression needsreview added
Priority: undecidedblocker
Status: newopen

Confirmed;

comment:3 Changed 9 years ago by Rick Waldron

Milestone: 1.51.4.5

comment:4 Changed 9 years ago by dmethvin

Resolution: wontfix
Status: openclosed

It was this commit for #2814:

https://github.com/jquery/jquery/commit/69994211b078b8711220eaef33cc1bd6a63c5772

That jQuery.event.fix method is a bottleneck for event delivery so we should keep it as short as possible and not include browser-specific properties.

You can still get to this Mozilla-specific property via event.originalEvent.originalTarget.

comment:5 Changed 9 years ago by dmethvin

Keywords: needsreview removed

comment:6 Changed 9 years ago by john

Version: 1.4.41.5

There wasn't a 1.4.5 release, was actually 1.5.

comment:7 Changed 9 years ago by john

Milestone: 1.4.51.5

There was no 1.4.5 release, was actually 1.5.

Note: See TracTickets for help on using tickets.