-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: An invalid form control with name='xxxx' is not focusable #739
Comments
Same here. I'd love to get a solution as well. Perhaps related to #620 |
Will try to reproduce and fix. |
Also see #620 where I tested it in some browsers. Could you both give details on browser and setup etc.? |
This error occurs because of the "required" attribute on the element. Since this component hide the select element, when the browser trying to validate the form prior to the submit event it cannot set the focus on a hidden input hence the error. For more info see: The solution is to remove "required" attribute on the select element OR add "novalidate" to the form. The first choice would be preferable, and implement another method for "required" validation. // for now you can do this to by pass the bug $(selector).multiselect(options).prop('required', false); |
I'm also having the issue. The setup is completely standard and used on modern browsers. The only thing which would indicate a problem is this warning in the console on page load.
The required attribute only becomes problematic once the |
This likely happens because of library / plugin conflicts. This attribute should work 100% fine if you're not running and initializing any other plugins on the page you're working on. More info in issue #798. |
Hi friends, perhaps I'm missing something in the documentation but for some reason when I apply the
required
attribute to the select and try to submit the form, when no options have been selected, nothing happens and an error messageQuestion: An invalid form control with name='xxxx' is not focusable
appears. Any tips are appreciated. Thank you.The text was updated successfully, but these errors were encountered: