Bootstrap: <button> stays focused after pressing them

Created on 9 Nov 2014  路  2Comments  路  Source: twbs/bootstrap

I noticed this strange behavior, that <button> tags stay focused after pressing them. Unfortunately that means that they keep their "pressed" state appearance and confuse users about their current state. This is especially evident for the .btn .btn-default class.
<a> tags are not affected.

Only noticed this behavior only in Chrome (OSX & Win8). FF and Safari are OK on OSX. This could be a browser related issue.

I haven't found any Github issue about this so far. Nobody had any more info on IRC as well.

button

css

Most helpful comment

That's standard browser behavior. You could theoretically override the visuals, but we strongly recommend against doing so for accessibility reasons.

All 2 comments

That's standard browser behavior. You could theoretically override the visuals, but we strongly recommend against doing so for accessibility reasons.

public handleClick (e: any) { if (e) e.preventDefault() }
onMouseDown={this.handleClick}

https://github.com/styled-components/styled-components/issues/2366
https://github.com/A1vinSmith/storybook-stylecommoncomponents-test

Was this page helpful?
0 / 5 - 0 ratings

Related issues

METACEO picture METACEO  路  46Comments

dharmeshpipariya-zz picture dharmeshpipariya-zz  路  38Comments

markoheijnen picture markoheijnen  路  56Comments

SoftHai picture SoftHai  路  47Comments

lpilorz picture lpilorz  路  43Comments