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

ziyi2 picture ziyi2  路  3Comments

alvarotrigo picture alvarotrigo  路  3Comments

leomao10 picture leomao10  路  3Comments

cvrebert picture cvrebert  路  3Comments

IamManchanda picture IamManchanda  路  3Comments