I have a web app, where people can search for stuff. In IE9 the focus is on the search input element but the first button is highlighted so when someone press enter it would always execute the first button.
I don't want people to be able to press enter and execute the first button.
The reason is because some people tends to press enter after typing in the search's input text box even though it's base on keyup event.
I've try refocusing it to the search input element. I've also try blurring the button. It doesn't seem to work.
Does anyone know a solution to this?
Thank you for your time.
edit: I don't want to highjack the enter button because what if someone actually tab the focus on to the first button and press enter? Maybe I can check for that? Or maybe there's a better solution?
Edit 2: Found a similar problem here: Stopping IE from highlighting the first submit-button in a form But the solution is for that question is ASP.
edit 3:
A code example:
<div >
<label>ETTRN:<input type="text" id="search" maxlength="16" /></label>
<input type="submit" value="Generate CSV" id="generate_csv" />
</div>