IE Bug: One Text Input / Enter Key Doesn’t Submit
Here is the fix to this quirky and aggravating bug. If you only have one input text box and you want to submit the form by pressing the enter key, IE will simply refresh the current page for you! Simply add this hidden text input between your form tags and the form will submit as expected!
<input type="text" style="visibility:hidden;display:none;" name="dummy"></input>
January 21st, 2009 at 1:05 pm
Thank you so much!
I’ve been at my wit’s end for a couple of hours trying to fix this bug for a client. Turns out that in the old version of the page, there was more than one input box, but in my new design, there is only one, so this situation occurs (they have to use IE, corporate stuff).
Again, thanks.
May 12th, 2009 at 5:59 pm
Anyone figured out what to do if there is a TextArea in the form aswell?
May 18th, 2009 at 11:04 am
I don’t tink it’s possible with a TextArea because the default action is to go to a new line if you are focused on it. Maybe someone else has solved this using some clever javascript however.
October 16th, 2009 at 10:16 am
Thanks!
This works great for me