Bug Tracker

Opened 10 years ago

Closed 10 years ago

#6988 closed bug (fixed)

val(['option1', 'option2']) don't work in <select multiple="multiple"> if <option> have attribute value="value"

Reported by: miwol Owned by:
Priority: undecided Milestone: 1.4.3
Component: attributes Version: 1.4.2
Keywords: select miltiple val Cc:
Blocked by: Blocking:

Description

I found a problem with <select multiple="multiple"> and val(). $('select').val(['option1', 'option2']) work correct with <option>option1</option>. When a write <option value="1">option1</option> then jQuery select nothing. $('select').val([1, 2]) select nothing too.

Attachments (2)

test.2.html (1.0 KB) - added by miwol 10 years ago.
test.html (1.0 KB) - added by miwol 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by miwol

Attachment: test.2.html added

Changed 10 years ago by miwol

Attachment: test.html added

comment:1 Changed 10 years ago by dmethvin

Priority: undecided

Further discussion, suggested patch, refutation of bug:

http://github.com/jquery/jquery/pull/30

comment:2 Changed 10 years ago by snover

Resolution: fixed
Status: newclosed

This is working properly according to the spec. Additional changes were made in 1.4.3 to improve the selection of current values from selects.

Last edited 10 years ago by snover (previous) (diff)
Note: See TracTickets for help on using tickets.