Here is a simple html5 form with two select controls. Changing the selection in the first select generates a new list of options for the second select. Both have the "required" attribute, and an initially selected blank option. The odd bit is that I get a red validation outline around the second select control, without submitting the form. No tool-tip with an error message, just the outline.
<!DOCTYPE html>
<BODY>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function select_update(srcCtrlId, DstCtrlId)
{
//alert(srcCtrlId+','+DstCtrlId+','+url);
sel1 = document.getElementById(srcCtrlId);
srcValue = sel1.value;
sel2 = document.getElementById(DstCtrlId);
while(sel2.options.length > 0) {
sel2.remove(0);
}
if (srcValue == '')
{
var oOption = new Option( '(no matches)', '', true, true );
sel2.add(oOption);
}
else
{
var oOption = new Option( '-- Select2 --', '', true, true );
sel2.add(oOption);
for(i=1; i<=5; ++i)
{
v = srcValue * 10 + i;
s = 'Select2, Option'+v;
var oOption = new Option( s, v, false, false );
sel2.add(oOption);
}
}
}
function jsValidatePage1()
{
alert('onSubmit');
return false;
return true;
}
</script>
<form onSubmit="return jsValidatePage1();">
<select name="select1" id="select1" size="1" onChange="select_update('select1','select2');" required>
<option value="" selected="selected">-- Select1 --</option>
<option value="1">Select1, Option1</option>
<option value="2">Select1, Option2</option>
<option value="3">Select1, Option3</option>
<option value="4">Select1, Option4</option>
<option value="5">Select1, Option5</option>
</select>
<br><br>
<select name="select2" id="select2" size="1" required>
<option value="" selected="selected">-- Select2 --</option>
<option value='' DISABLED>(empty)</option>
</select>
<br><br>
<select name="select3" id="select3" size="1" required>
<option value="" selected="selected">-- Select3 --</option>
<option value="1">Select3, Option1</option>
<option value="2">Select3, Option2</option>
<option value="3">Select3, Option3</option>
<option value="4">Select3, Option4</option>
<option value="5">Select3, Option5</option>
</select>
<br><br>
<input type="text" name="dummy" value="" required="">
<br><br>
<input type="submit">
</form>
</html>
fiddle here: https://jsfiddle.net/afg57g0u/1/
Run the code, and then select any option in the first select control. The second lights up red immediately, but the other required controls do not, so it's not validating the whole form, just the second select control (sort-of).
This happens in Firefox 36.0.4. This does not happen on IE 11.0.17, Opera 28.0, Chrome 41.0.2272.101, or Safari 5.1.7 (duh). (on Win8 box)
I can find no other mention online of a similar problem. I have tried numerous approaches to disable or work-around this problem, but no luck. Does anyone have any ideas? Is this a Firefox bug?