Opened 11 years ago
Closed 11 years ago
#12584 closed bug (fixed)
jQuery wrongly serializes <select> with one disabled <option>
Reported by: | michal.cichra | Owned by: | gibson042 |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | attributes | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi, I found issue when I tried to get value of <select> which had just one <option> and that option had disabled attribute. Here is scenario to reproduce - http://jsfiddle.net/M45H3/3/ Bug is caused by code fixing issue #2551 - https://github.com/jquery/jquery/blob/15b5dbfe2386d67b8c1df3305812b35abc04458c/src/attributes.js#L262-L264
What it should do? As normal browser - return nothing.
Change History (4)
comment:1 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Milestone: | None → 1.9 |
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 11 years ago by
Owner: | set to gibson042 |
---|---|
Status: | open → assigned |
But easy to fix. https://github.com/jquery/jquery/pull/932
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Thanks for the clear bug report! I agree, looks like that patch doesn't take disabled options into account. It must not be a common case, judging by how long the bug has been there.