Skip to main content

Bug Tracker

Side navigation

#4598 closed enhancement (worksforme)

Opened April 28, 2009 05:42AM UTC

Closed April 17, 2011 12:19AM UTC

Last modified June 27, 2014 05:20PM UTC

Adding capture to allow better event delegation

Reported by: justinbmeyer Owned by:
Priority: low Milestone:
Component: event Version: 1.3.2
Keywords: Event Delegation Cc:
Blocked by: Blocking:
Description

in event.js line 10

from

add: function(elem, types, handler, data) {

to

add: function(elem, types, handler, data, capture) {

AND line 73 from

elem.addEventListener(type, handle, false);

to

elem.addEventListener(type, handle, capture || false);

this is needed for blur / focus (which do not bubble) to work.

Attachments (0)
Change History (7)

Changed June 13, 2010 02:36AM UTC by dmethvin comment:1

component: unfiledevent

Changed November 11, 2010 03:29AM UTC by dmethvin comment:2

#5263 is a duplicate of this ticket.

Changed November 11, 2010 02:36PM UTC by SlexAxton comment:3

milestone: 1.41.5
priority: minorlow
status: newopen

Thanks Justin. Seems reasonable.

Changed April 17, 2011 12:19AM UTC by john comment:4

resolution: → worksforme
status: openclosed

I don't think this is needed anymore.

Changed September 17, 2013 10:39AM UTC by anonymous comment:5

Replying to [comment:4 john]:

I don't think this is needed anymore.

Still needed. Attach listeners for capturing phase is the only thing I have to do manually without jQuery... It's SO bad to have different types of event object (jQuery or native) in bubbling and capturing handlers... Please, let capturing live, sometimes it is neccesary.

Changed June 26, 2014 08:05PM UTC by NemoStein comment:6

Replying to [comment:5 anonymous]:

Attach listeners for capturing phase is the only thing I have to do manually without jQuery...

Same here.

Since it's possible to do this in plain JavaScript, I can't see why we can't have it.

Changed June 27, 2014 05:20PM UTC by dmethvin comment:7

See #14953