Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#14958 closed bug (cantfix)

Setting type attribute of input in IE8

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:


Dynamically creating elements and then setting the type throws an error in IE7 and IE8 but not in other supported browsers.

var el = $('<input/>'); 
el.attr('type', 'text'); // throws an error

Tested in 1.11.0, 1.10.1, and 1.9.1 with the same results.

Change History (4)

comment:1 Changed 9 years ago by dmethvin

Resolution: cantfix
Status: newclosed

Yes, and we cannot fix that because the browser just doesn't allow it. Until jQuery 1.9 we used to throw an error on *all* browsers to make them equally dumb, but decided that was a bad idea.

comment:3 Changed 9 years ago by scottgonzalez

There's also a note on http://api.jquery.com/attr/ about this.

comment:4 Changed 9 years ago by dmethvin

C'mon, *nobody* reads the docs page. Can you provide an authoritative link to StackOverflow?

Note: See TracTickets for help on using tickets.