Always remove required attribute in SelectFilter2.js (#11331)
Fixes bug on browsers which do support the required attribute but not the :valid pseudo-selector
This commit is contained in:
parent
6d37c089ae
commit
8eb4133714
|
@ -179,11 +179,11 @@ Requires jQuery, core.js, and SelectBox.js.
|
||||||
// This is much faster in WebKit browsers than the fallback.
|
// This is much faster in WebKit browsers than the fallback.
|
||||||
field.attr('required', 'required');
|
field.attr('required', 'required');
|
||||||
any_selected = field.is(':valid');
|
any_selected = field.is(':valid');
|
||||||
field.removeAttr('required');
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Browsers that don't support :valid (IE < 10)
|
// Browsers that don't support :valid (IE < 10)
|
||||||
any_selected = field.find('option:selected').length > 0;
|
any_selected = field.find('option:selected').length > 0;
|
||||||
}
|
}
|
||||||
|
field.removeAttr('required');
|
||||||
return any_selected;
|
return any_selected;
|
||||||
},
|
},
|
||||||
refresh_icons: function(field_id) {
|
refresh_icons: function(field_id) {
|
||||||
|
|
Loading…
Reference in New Issue