#16344 closed defect (fixed)
preventDefault() doesn't set evt.defaultPrevented on bubbled event on IE6-8
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | Events | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #15097 |
Description (last modified by )
Although calling evt.preventDefault() will set evt.defaultPrevented, when the event bubbles to the parent DOMNode, evt.defaultPrevented is no longer set.
Although dojo/tests/on/on.js has code to test that evt.defaultPrevented is getting set, that code doesn't test what the bubbled event object looks like. But by the existence of that test I assume that it's supposed to work.
Change History (6)
comment:1 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|---|
Owner: | changed from Kris Zyp to bill |
Status: | new → assigned |
comment:3 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 8 years ago by
Blocking: | 15097 added |
---|
(In #15097) Just noting the dependency for the record.
comment:12 Changed 8 years ago by
Re the try/catch in [29961], another approach would be to save the lastEvent's event type and target in separate local variables, and then not access lastEvent at all unless those variables matched. Then we wouldn't need the try/catch at all.
There's also an exception accessing lastEvent.type when lastEvent refers to an event that's already finished bubbling, but lastEvent hasn't been cleared by the setTimeout() yet.
I'll check in a fix for both these problems and updated test case to show them.