Bug Tracker

Opened 9 years ago

Closed 9 years ago

#15234 closed bug (notabug)

.html method on select element "selects" the first option

Reported by: tday Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.1
Keywords: Cc:
Blocked by: Blocking:

Description

Please check out the fiddle: http://jsfiddle.net/3u0hceng/

If the option elements are added to a select element using the .html method, the first option is selected and the html option does not have a selected attribute. This is unwanted behavior.

This was seen in Chrome Version 37.0.2062.103 m on a Windows 7 machine.

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: notabug
Status: newclosed

This report uses passive voice: "This is unwanted behavior." However, you have reported it to jQuery as a bug, so I assume you think jQuery caused it. I can reproduce it without jQuery involved at all: http://jsfiddle.net/3u0hceng/1/

Given that jQuery isn't loaded, I'll close this.

Note: See TracTickets for help on using tickets.