Skip to main content

Bug Tracker

Side navigation

#7534 closed bug (wontfix)

Opened November 16, 2010 03:38PM UTC

Closed November 19, 2010 04:41AM UTC

Last modified January 31, 2011 05:54PM UTC

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

Reported by: jquery@adamcraven.me 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

Attachments (0)
Change History (7)

Changed November 16, 2010 04:08PM UTC by jquery@adamcraven.me comment:1

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

Changed November 16, 2010 05:31PM UTC by rwaldron comment:2

component: unfiledevent
keywords: → regression, needsreview
priority: undecidedblocker
status: newopen

Confirmed;

Changed November 16, 2010 05:31PM UTC by rwaldron comment:3

milestone: 1.51.4.5

Changed November 19, 2010 04:41AM UTC by dmethvin comment:4

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.

Changed November 19, 2010 04:44AM UTC by dmethvin comment:5

keywords: regression, needsreviewregression

Changed January 31, 2011 05:53PM UTC by john comment:6

version: 1.4.41.5

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

Changed January 31, 2011 05:54PM UTC by john comment:7

milestone: 1.4.51.5

There was no 1.4.5 release, was actually 1.5.