How can I remove focus from submit button? I don't know why it is there in the first plate, and it looks really ugly here is a screenshot :
And here is how it should look like, it regains its appearance after I click beside it and hover it.
How can I remove focus from submit button? I don't know why it is there in the first plate, and it looks really ugly here is a screenshot :
And here is how it should look like, it regains its appearance after I click beside it and hover it.
The first submit button in a form is always "in focus", hence, when you hit enter, your form gets submitted.
See responses to a similar post: http://stackoverflow.com/questions/442548/stopping-ie-from-highlighting-the-first-submit-button-in-a-form
In your body or form...
<form onready="document.getElementById('submit').blur();">
...
<input type="submit" id="submit" />
</form>
Try this in your button's CSS, or that of the enclosing <a>
if that's what you are using in the markup (reference):
-moz-outline:0 none;
outline:0 none;
Bear in mind that it is a valuable accessibility/keyboard feature, so ideally you would provide some alternate focus hint that is more visually pleasing to you.
This worked :
var selectedInput = null;
$(document).ready(function() {
$('input, textarea, select').focus(function() {
this.blur();
});
});