Piet
Piet

Reputation: 2208

This.blur() doesn't work for mobile

I want to remove the focus after clicking a button[type=button]. To accomplish this I am using:

<button type="button" onfocus="this.blur();">Click here</button>

This works flawless on laptop and pc, but doesn't work for mobile devices. Is there anyone who knows how to remove the focus for mobile?

Upvotes: 6

Views: 2519

Answers (1)

Shobhit
Shobhit

Reputation: 1126

Put this in your button element: style="outline:none;-moz-outline:none" hidefocus="true"

Upvotes: 3

Related Questions