#4598 closed enhancement (worksforme)
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
false); |
this is needed for blur / focus (which do not bubble) to work.
Change History (7)
comment:1 Changed 13 years ago by
Component: | unfiled → event |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
Milestone: | 1.4 → 1.5 |
---|---|
Priority: | minor → low |
Status: | new → open |
Thanks Justin. Seems reasonable.
comment:4 follow-up: 5 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | open → closed |
I don't think this is needed anymore.
comment:5 follow-up: 6 Changed 9 years ago by
Replying to 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.
comment:6 Changed 9 years ago by
Replying to 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.
#5263 is a duplicate of this ticket.