Side navigation
#9855 closed bug (cantfix)
Opened July 19, 2011 12:01AM UTC
Closed July 19, 2011 12:48AM UTC
Last modified July 21, 2011 12:09PM UTC
html(data) function, where the data contains the "onchange" - attribute doesn't attach the onchange event in IE 9
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | manipulation | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$(document).ready(function () {
$('#div').append('<div>No Event:</div><select onchange="window.alert(' + "'changed'" + ');"><option>Change event not attached</option><option>and not fired in IE 9</option></select>')
});
<div id="div"></div>
(works fine in FF, Safari)
Attachments (0)
Change History (2)
Changed July 19, 2011 12:48AM UTC by comment:1
component: | unfiled → manipulation |
---|---|
priority: | undecided → low |
resolution: | → cantfix |
status: | new → closed |
Changed July 21, 2011 12:09PM UTC by comment:2
Just to follow up, the reason we can't fix this is because IE does not correctly handle the change
event. When you attach this event via a jQuery handler via .bind
, .live
, or .delegate
we make heroic efforts to simulate its behavior. We can't do that for inline handlers. In general, inline handlers are bad practice and we do not recommend using them.