Skip to content

Commit

Permalink
Multi-Selects 'val' now work when only 'multiple' is written.
Browse files Browse the repository at this point in the history
They didn't work as the vale of the 'multiple' in '<select multiple>' is
'' and therefore falsy.
  • Loading branch information
Joscha Rohmann committed Jan 7, 2016
1 parent 5156b16 commit acf58c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query/DomQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ define([

if (type == 'checkbox') {
value(element.checked);
} else if (tagName == 'select' && element.getAttribute('multiple')) {
} else if (tagName == 'select' && element.getAttribute('multiple') !== null) {
var values = [];
var selectedOptions = element.selectedOptions;
if (selectedOptions) {
Expand Down

0 comments on commit acf58c9

Please sign in to comment.