Should .trigger() use .fireEvent in IE?

Should .trigger() use .fireEvent in IE?

I just tracked down an issue that was causing the jQuery UI Datepicker to be incompatible with ASP.Net validator controls. Here's the ticket:
<a href="http://dev.jqueryui.com/ticket/4071" target="_blank">http://dev.jqueryui.com/ticket/4071</a>
and a visual test page:
<a href="http://jquery-ui.googlecode.com/svn/trunk/tests/visual/datepicker/datepicker_ticket_4071.html" target="_blank">http://jquery-ui.googlecode.com/svn/trunk/tests/visual/datepicker/datepicker_ticket_4071.html</a>
The issue is occurring when a date (an A element) in the datepicker is clicked, it calls $(INPUTelement).change() and when the event handler bound to that element is triggered, it gets the click event on the A instead of a change event on the input.
It seems when an event is triggered programatically in IE, and the event handler was bound via the onchange attribute (whether html or javascript) instead of attachEvent, a new event object isn't created if you call elem.oneventname() but one is if you call elem.fireEvent('oneventname'). Here's a minimal test page:
<a href="http://jsbin.com/oliwi" target="_blank">http://jsbin.com/oliwi</a>
source: <a href="http://jsbin.com/oliwi/edit" target="_blank">http://jsbin.com/oliwi/edit</a>
It seems it could be solved easily by using .fireEvent if it exists inside of .trigger():
elem.fireEvent && elem.fireEvent( type ) || elem[ type ]();
Thoughts?
- Richard
References:
Jquery datepicker popup not closing on select date in IE8
<a href="http://stackoverflow.com/questions/1704398/jquery-datepicker-popup-not-closing-on-select-date-in-ie8" target="_blank">http://stackoverflow.com/questions/1704398/jquery-datepicker-popup-not-closing-on-select-date-in-ie8</a>
Fire the onchange event the browser independent way
<a href="http://www.rakshith.net/blog/?p=35" target="_blank">http://www.rakshith.net/blog/?p=35</a>
Event class for jQuery
<a href="http://groups.google.com/group/jquery-dev/msg/1d7ab35fa59fa053">http://groups.google.com/group/jquery-dev/msg/1d7ab35fa59fa053</a>


--