Bug Tracker

Modify

Ticket #12584 (closed bug: fixed)

Opened 19 months ago

Last modified 18 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 19 months ago by dmethvin

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to attributes
  • Milestone changed from None to 1.9

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.

comment:2 Changed 19 months ago by gibson042

  • Owner set to gibson042
  • Status changed from open to assigned

comment:3 Changed 19 months ago by michal.cichra

Wow! I'm stunned! Thank you very much. Keep up amazing work.

comment:4 Changed 18 months ago by gibson042

  • Status changed from assigned to closed
  • Resolution set to fixed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.