Summary: | event.preventedDefault is not reset after an event is dispatched | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pablo Flouret <pf> | ||||
Component: | UI Events | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED WONTFIX | ||||||
Severity: | Normal | CC: | abarth, ap, ehsan, japhet, rniwa, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://samples.msdn.microsoft.com/ietestcenter/domevents/domevents_harness.htm?url=EventObject.after.dispatchEvent.html | ||||||
Attachments: |
|
Description
Pablo Flouret
2012-01-18 23:40:38 PST
Created attachment 123081 [details]
patch
Does the new behavior match other browsers, or only the spec? (In reply to comment #2) > Does the new behavior match other browsers, or only the spec? Matches IE, not firefox or opera, so yeah, might be a better idea to hold off on this one and see if anyone else is going to match the spec as well. I wonder where the "backwards compatibility" part comes from then. Maybe you'd be willing to search working group archives, or even e-mail them? There's some info on that here: http://lists.w3.org/Archives/Public/www-dom/2011JanMar/0063.html It seems that the wording didn't just confuse me. I'd say it's mostly an unresolved issue, at least for the dom level 3 spec, dom core says that the flags should be reset in initEvent. Comment on attachment 123081 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=123081&action=review > Source/WebCore/dom/EventDispatcher.cpp:393 > + return !defaultPrevented; We normally return defaultPrevented, instead of !defaultPrevented, so you might want to do that here. It appears that DOM4 doesn't have that clause so it's likely that we don't need to fix this bug: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dispatching-events I think we can implement this in Gecko as well, as the webcompat risk seems rather low. I filed this bug for Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=722437 smaug from Mozilla told me IE started this behavior in 9. So I'll be shocked if this had a backward compatibility issue. On the other hand, I don't think this will cause a serious compatibility with us either so I'm fine with going forward with this patch as well. (In reply to comment #7) > It appears that DOM4 doesn't have that clause so it's likely that we don't need to fix this bug: > http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dispatching-events It was moved to initEvent(), see step 3 here: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-event-initevent I think the idea is to make events re-usable, i can make a new patch if we want to go that way as well. Filed a new patch at bug 83964 with what the spec actually says now. This one should probably be closed as invalid. Comment on attachment 123081 [details]
patch
The spec has been changed NOT to reset these changes when re-dispatching events.
Won't fix since this behavior is no longer mandated by the spec, and may pose backward compatibility issues. |