Skip to main content

Bug Tracker

Side navigation

#9547 closed bug (fixed)

Opened June 08, 2011 06:46AM UTC

Closed June 08, 2011 09:12AM UTC

Last modified June 08, 2011 05:43PM UTC

Cannot create an input of type=number in jQuery 1.4.4 and IE 9.0.8112.16421

Reported by: duereg@hotmail.com Owned by:
Priority: low Milestone: 1.next
Component: attributes Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

The following code consistently explodes in IE 9:

$("<input>")

.attr("type", "number")

.attr("min", "1")

.attr("id", "size")

.attr("value", 10) .addClass("size")

Attachments (0)
Change History (4)

Changed June 08, 2011 06:56AM UTC by duereg@hotmail.com comment:1

Replying to [ticket:9547 duereg@…]:

The following code consistently explodes in IE 9: $("<input>") .attr("type", "number") .attr("min", "1") .attr("id", "size") .attr("value", 10) .addClass("size")

An example of this behavior:

http://jsfiddle.net/q77Rg/1/

Tested under Windows 7 Home Premium SP 1

Changed June 08, 2011 08:42AM UTC by duereg@hotmail.com comment:2

This behavior is resolved in still present in jQuery 1.52 but resolved in jQuery 1.6.

Changed June 08, 2011 09:12AM UTC by addyosmani comment:3

component: unfiledattributes
priority: undecidedlow
resolution: → fixed
status: newclosed

Thanks for submitting a ticket to the jQuery project!. Due to limited resources, we're only able to maintain a single version of jQuery in active development at any one time. As a result of this we are unable to make fixes available for old releases outside of our main release cycle, but as you mention, jQuery 1.6 now resolves the behaviour you've mentioned. We strongly recommend using 1.6.x rather than 1.4.4 in this instance.

Changed June 08, 2011 05:43PM UTC by rwaldron comment:4

It should be noted that IE<9 won't even let you "change" the type attribute after an input element has been created.