Browser Issue: An invalid form control with name ____ is not focusable
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.
Comments are closed.
Thanks! I’ve been working on this bug for 2 hours now (its also in safari 5)
THAAAAAAAANKSSSSSSSSS GOD!… 1 hour saved.
min=”1″ while value=”0″
THANKS! THANKS THANKS!
thanks!!!!!!. I was experience the same problem with chrome.
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
There is still this bug in certain case under Google Chrome 12 when having html5 attribute “required” on textarea.
Thanks a lot.. !
I was looking for the solution for same issue.
thk man
Thank you, that was also an issue for my html-input, filled by fck-editor. I also had to remove the required=”1″ attribute
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.