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.
OPTION 1: Use the :focus-visible pseudo-class The :focus-visible pseudo-class can be used to remove outlines and focus rings on buttons and various elements for users that are NOT navigating via keyboard (i.e., via touch or mouse click).
To remove the focus on an input tag element in HTML, you can use the blur() method on the element using JavaScript. This input tag will be already focussed when a user visits the website and we want to remove the focus when we click the button below it.
This worked :
var selectedInput = null; $(document).ready(function() { $('input, textarea, select').focus(function() { this.blur(); }); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With