question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select2 dropdown An invalid form control with name='' is not focusable.

See original GitHub issue

When dropdown field is required and empty and all other fields are correctly filled up, clicking a save button results in An invalid form control with name='dropdown' is not focusable. in js console, the form is not submitted, and nothing happens.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
sngrlcommented, May 6, 2021

This is my quick solution.

CSS-rule:

.select2-hidden-accessible[required] {
    display: block;
    height: 0;
    border: 1px solid transparent;
    margin-bottom: -2px;
}

Result on submit form which contains select2 element with required attribute:

Screenshot_579

0reactions
martincptcommented, Dec 21, 2022

None of these solved this issue in my case. I have no such an item in the DOM like .select2-hidden-accessible[required]. Does anyone have up to date solution for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

An invalid form control with name='' is not focusable
This issue occurs on Chrome if a form field fails validation, but due to the respective invalid control not being focusable the browser's...
Read more >
An Invalid Form Control with Is Not Focusable Error Occurs
An Invalid Form Control is Not Focusable error occurs when working with the Kendo UI ComboBox and Kendo UI Validator.
Read more >
An invalid form control with name='fieldname' is not focusable.
An invalid form control with name ='fieldname' is not focusable. I have a bootstrap tab surrounds by a form tab, if i change...
Read more >
How to Fix 'An invalid form control with name=" " is not focusable'
Are you getting the "An invalid form control with name=' ' is not focusable." error? Here's the cause and how to fix it....
Read more >
[Select element] An invalid form control with name='...' is not ...
[Select element] An invalid form control with name='...' is not focusable. ; Closed (works as designed) ; Project: Webform ; Version: 8.x-5.x-dev.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found