Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#14958 closed bug (cantfix)

Setting type attribute of input in IE8

Reported by: tyler.barrus@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:

Description

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 5 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 5 years ago by scottgonzalez

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

comment:4 Changed 5 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.