Bug Tracker

Modify

Ticket #7534 (closed bug: wontfix)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by jquery@…

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

comment:2 Changed 3 years ago by rwaldron

  • Keywords regression, needsreview added
  • Priority changed from undecided to blocker
  • Status changed from new to open
  • Component changed from unfiled to event

Confirmed;

comment:3 Changed 3 years ago by rwaldron

  • Milestone changed from 1.5 to 1.4.5

comment:4 Changed 3 years ago by dmethvin

  • Status changed from open to closed
  • Resolution set to wontfix

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 3 years ago by dmethvin

  • Keywords regression added; regression, needsreview removed

comment:6 Changed 2 years ago by john

  • Version changed from 1.4.4 to 1.5

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

comment:7 Changed 2 years ago by john

  • Milestone changed from 1.4.5 to 1.5

There was no 1.4.5 release, was actually 1.5.

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.