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.

About these ads
  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


    min=”1″ while value=”0″


  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:

  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

  8. June 1, 2012 8:54 am

    Thank you, that was also an issue for my html-input, filled by fck-editor. I also had to remove the required=”1″ attribute

  9. January 12, 2013 9:51 am

    Hello There. I found your blog using msn. This is a very well written article.

    I will be sure to bookmark it and come back to read more of your useful information.
    Thanks for the post. I’ll certainly comeback.

Comments are closed.


Get every new post delivered to your Inbox.

%d bloggers like this: