Side navigation
#11916 closed bug (cantfix)
Opened June 15, 2012 01:57AM UTC
Closed July 25, 2012 02:17AM UTC
Adding a button type="button" .. element in iE8 + iE7 compatibility mode doesnt set the type attribute in jQuery 1.5+
Reported by: | thetoolman@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | manipulation | Version: | git |
Keywords: | ie7 ie8 | Cc: | |
Blocked by: | Blocking: |
Description
in iE8 + iE7 compatibility mode, when you create insert a <button type="button ... > element, jQuery no longer inserts the type="button" attribute. e.g.
$('<button type="button">button</button>').appendTo("div");
Prior to 1.5, JQuery did insert the type attribute correctly. Here is a minimal example:
Attachments (0)
Change History (2)
Changed June 23, 2012 02:06PM UTC by comment:1
component: | unfiled → manipulation |
---|---|
keywords: | → ie7 ie8 |
priority: | undecided → low |
status: | new → open |
Changed July 25, 2012 02:17AM UTC by comment:2
resolution: | → cantfix |
---|---|
status: | open → closed |
I spent some time tracing this through. When the button HTML goes through .clean()
, IE8 consistently strips off the type="button"
attribute when it's applied to div.innerHTML
. I tried using different wrapMap tags such as <form>
but that didn't help.
You can see this is independent of jQuery with this incredibly simple test case, be sure to click the broken-page icon to get into IE7 compat mode: http://jsfiddle.net/Rsz5Q/
Nothing we can do here.
Confirmed. This only occurs in IE8 when running in IE7 Compatibility View. To do that you need to run IE8, go to the jsFiddle above, and click the broken-page icon to the right of the URL.