webshim icon indicating copy to clipboard operation
webshim copied to clipboard

Error: An invalid form control with name='xyz' is not focusable. (Chrome only)

Open danyaPostfactum opened this issue 11 years ago • 1 comments
trafficstars

When I press "submit" button, I get such errors in the browser console when using html5 forms shim. This happens because webshim hides fields, than have required attribute and Chrome tells that it can't focus on them.

danyaPostfactum avatar Sep 26 '14 02:09 danyaPostfactum

Hi,

Unfortunatley, I can't reproduce this. See here a demo: http://jsfiddle.net/trixta/h249hhyx/.

Normally this happens, if an invalid field is hidden and the invalid event isn't handeld. (i.e. event.preventDefault()). Webshim normally automatically handles the invalid event, if a form field was hidden by webshim.

Although this is no fix. You can use replaceValidationUI or iVal to tell webshim to handle all invalids.

Can you provide a testcase or does the explanation help you?

aFarkas avatar Sep 26 '14 09:09 aFarkas