Ticket #2529442 (closed defect)

Reporter


glob.com.au
Opened: 05/13/11
Last modified: 05/18/11
Status: closed
Type: defect
Resolution: invalid

Owner


Luke Smith
Target Release:
Priority: P3 (normal)
Summary: Manually triggered events are not fired on IE9 (works in compatibility mode)
Description:

If you manually trigger an event on IE9 via

var evt = document.createEventObject();
element.fireEvent('onchange', evt);

the listeners are not triggered.

The works in older versions of IE, and also works in IE9 when IE8 compatibility mode is forced.

Type: defect Observed in Version: 2.9.0
Component: Event Severity: S2 (high)
Assigned To: Luke Smith Target Release:
Location: Priority: P3 (normal)
Tags: Relates To:
Browsers: IE 9.x
URL:
Test Information:

Attachments

Attachment #1: yui-event-ie9.html (download)

Change History

George

YUI Developer

Posted: 05/16/11
  • owner changed from Adam Moore to Luke Smith
  • priority changed to P3 (normal)
  • status changed from new to assigned

Luke Smith

YUI Contributor

Posted: 05/18/11
  • resolution changed to invalid
  • status changed from assigned to closed

You're referring to a DOM method that was changed to match W3C spec in version 9. Use the event-simulate or event-node-simulate module to call whichever method is appropriate for the given browser. E.g.


YUI().use('event-node-simulate', function (Y) {
Y.one("#foo").on('click', function () { Y.log("I've been clicked!"); });

setTimeout(function () { Y.one("#foo").simulate("click"); }, 2000);

});