Ticket #2529587 (closed defect)
Reporter Luke Smith |
Opened: 12/6/10 Last modified: 01/14/11 Status: closed Type: defect Resolution: fixed |
Owner Adam Moore |
Target Release: 3.3.0 Priority: P1 (critical) |
|---|---|---|---|
| Summary: | e.preventDefault() ineffective in IE9 when node loaded from seed | ||
| Description: | The conditional loading uses a UA sniff for IE to load event-base-ie.js, which paves over preventDefault and stopPropagation (and sets a bunch of properties). IE 9 requires e.preventDefault() to prevent default behavior, but the paved versions in event-base-ie.js don't reference the method. Thus, Y.one('a').on('click', function (e) { e.preventDefault(); }); does not stop a link click from navigating away from the page. |
||
| Type: | defect | Observed in Version: | development master |
| Component: | Event | Severity: | S1 (critical) |
| Assigned To: | Adam Moore | Target Release: | 3.3.0 |
| Location: | Library Code | Priority: | P1 (critical) |
| Tags: | Relates To: | ||
| Browsers: | IE 9.x | ||
| URL: | |||
| Test Information: | YUI().use('node', function (Y) { |
||
Change History
|
Posted: 12/6/10
|
|
Posted: 12/6/10
Also of note, running the test code when loading from simpleyui, the preventDefault() worked, though I'm not sure why it would. |
|
Posted: 12/7/10
Switched to hasFeature checks for the DOM2 event system. |
|
Posted: 12/7/10
Ticket #2529596 was marked as a duplicate of this ticket. |
|
Posted: 01/14/11
|
This showed up while creating a synthetic event example that attempted to prevent the page scroll in response to arrow keys.
It looks like IE 9 requires the e.preventDefault() to stop the default action. Just setting returnValue = false; isn't cutting it.
Tested on both IE 9 beta and platform preview.