Opened 9 years ago
Closed 9 years ago
#14495 closed bug (notabug)
Select .val() select a ghost option
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
With this html :
<select id="select">
<option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option>
</select>
And this command : $('#select').val(0);
It's okay with jQuery 1.9 but wrong with 1.10.* ! jQuery 1.10 select a ghost empty option ?!
Change History (1)
comment:1 Changed 9 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → notabug |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The new behavior is correct; that "ghost empty option" is purely a display artifact of setting
selectedIndex
to -1. See #13514, 48d71d0c, and PR 1191 for details.