Skip to content

Browser Issue: An invalid form control with name ____ is not focusable

August 5, 2010

I came across an odd issue with Safari 4 this morning. A form in our application wasn’t submitting. I checked the error console, and it was returning an error of “An invalid form control with name=shipDepartment is not focusable”. I wasn’t getting any errors with Chrome, Firefox, and most surprisingly IE even worked fine.
I tried putting breakpoints wherever shipDepartment was referenced in the javascript, but none of them were firing. After using the Safari Web Inspector Console to change the value of the form field a few times, I found the problem. The field’s value was being set via javascript, and the value that was being set was longer than the maxlength attribute allowed. To fix the problem, I simply upped the maxlength attribute.
It’s not the most descriptive error message, and Googling the error mostly turned up Chromium error forums and comments, so maybe this will help someone having the same problem in Safari.

Advertisement
7 Comments leave one →
  1. Geler permalink
    August 30, 2010 2:50 pm

    Thanks! I’ve been working on this bug for 2 hours now (its also in safari 5)

  2. March 11, 2011 10:11 pm

    THAAAAAAAANKSSSSSSSSS GOD!… 1 hour saved.

    min=”1″ while value=”0″

    THANKS! THANKS THANKS!

  3. oac permalink
    March 28, 2011 12:59 pm

    thanks!!!!!!. I was experience the same problem with chrome.

  4. Rachel Lehman permalink
    April 13, 2011 2:43 pm

    I think this is the second time I have Google’d this issue and found your blog post at the top :)

    I hit this issue this morning with Chrome and found that it can also be caused by the browser trying to autocomplete the form field to a value longer than it’s max length. This is what clued me in:

    http://code.google.com/p/chromium/issues/detail?id=45640

  5. Sylvio permalink
    June 17, 2011 2:07 pm

    There is still this bug in certain case under Google Chrome 12 when having html5 attribute “required” on textarea.

  6. Cinni permalink
    June 28, 2011 11:17 am

    Thanks a lot.. !
    I was looking for the solution for same issue.

  7. July 1, 2011 7:46 am

    thk man

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.