aFarkas / webshim

[DEPRECATED] Webshims Lib is a modular capability-based polyfill-loading library
http://aFarkas.github.com/webshim/demos/index.html
MIT License
1.42k stars 201 forks source link

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

Open danyaPostfactum opened 10 years ago

danyaPostfactum commented 10 years ago

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.

aFarkas commented 10 years ago

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?