An invalid form control with name='' is not focusable. WITHOUT ANY REQUIRED OR HIDDEN INPUTS

后端 未结 8 907
一整个雨季
一整个雨季 2020-12-11 01:40

I\'m facing the well known Chrome\'s \"not-focusable-input\" error but my situation is different from the explained in the other post I could find there.

I have thi

相关标签:
8条回答
  • 2020-12-11 02:35

    I had the same issue so I removed required="required" from the troublesome fields.

    0 讨论(0)
  • 2020-12-11 02:36

    I had the same problem, and everyone was blaming to the poor hidden inputs been required, but seems like a bug having your required field inside a fieldset. Chrome tries to focus (for some unknown reason) your fieldset instead of your required input.

    This bug is present only in chrome I tested in version 43.0.2357.124 m. Doesn't happen in firefox.

    Example (very simple).

    <form>
      <fieldset name="mybug">
        <select required="required" name="hola">
          <option value=''>option 1</option>
         </select>
        <input type="submit" name="submit" value="send" />
      </fieldset>
    </form>

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

    The bug is hard to spot because usually fieldsets don't have a name so name='' is a WTF! but slice piece by piece the form until I found the culprid. If you get your required input from the fieldset the error is gone.

    <form>
        <select required="required" name="hola">
          <option value=''>option 1</option>
         </select>
    
      <fieldset name="mybug">
        <input type="submit" name="submit" value="send" />
      </fieldset>
    </form>

    I would report it but I don't know where is the chrome community for bugs.

    0 讨论(0)
提交回复
热议问题