WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
Bug 27176
input event should not bubble per spec
https://bugs.webkit.org/show_bug.cgi?id=27176
Summary
input event should not bubble per spec
Ojan Vafai
Reported
2009-07-11 08:51:42 PDT
See
https://bugs.webkit.org/show_bug.cgi?id=22135#c9
. We'd have to get both Gecko and WebKit (and Opera?) to change here. I prefer the spec behavior (i.e. not bubbling) as it makes input events cheaper. I don't see great use cases for bubbling oninput. I guess you could have a form that you validate on every input and you could have one input handler for the entire form. The real question is whether there are sites that currently depend on this behavior.
Attachments
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2009-07-13 10:27:08 PDT
Taking
Michael A. Puls II
Comment 2
2009-07-13 11:11:58 PDT
FWIW, I suggest to make HTML5 match browsers instead. Also, with <
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-EventTypes-complete
>, most of the value-changing events do bubble. If 'input' doesn't bubble, then there's no sense in having 'oninput' as a global attribute. Now, I also don't see much use in 'input' bubbling, but I think it should for consistency and to match current browser behavior. I don't know of any pages that depend on it though (for 'input' at least, maybe 'change'). Also, if one doesn't want the event to bubble, they can just listen at the desired stop point and use stopPropagation(). Would be interesting to fix this and see if it breaks anything though.
Erik Arvidsson
Comment 3
2009-07-13 12:03:36 PDT
I'm with Michael here. If we change input events to not bubble we should not have oninput as a global attribute until/if we have input events for contenteditable. I think the spec needs to change either way and even though I prefer to have input not bubble I think it might be more reasonable to make the spec match what browser actually do and change it to say that input should bubble.
Ian 'Hixie' Hickson
Comment 4
2009-07-28 12:51:13 PDT
The spec says input and change bubble now. However, whether they bubble or not, HTML5 makes the event handler attributes uniformly the same on all elements. The idea is to make it far easier to do event handler attributes in implementations -- you only need to put them on the base element (and then handle <body> and <frameset> as special cases) rather than having each element have its own set of event handler attributes.
Ojan Vafai
Comment 5
2009-07-30 15:03:31 PDT
The spec now matches WebKit. :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug