Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Buttons] disabled button is clickable #493

Closed
colinpmacarthur opened this issue Sep 11, 2015 · 8 comments
Closed

[Buttons] disabled button is clickable #493

colinpmacarthur opened this issue Sep 11, 2015 · 8 comments
Assignees
Labels
Type: Bug A problem in the code

Comments

@colinpmacarthur
Copy link
Contributor

On IE 10, the disabled button is clickable:

IE 10

Found on:

  • IE 10, Windows 7, Sauce Labs
  • iPad
  • iPhone
@colinpmacarthur colinpmacarthur added Type: Bug A problem in the code To be triaged labels Sep 11, 2015
@jpyuda
Copy link
Contributor

jpyuda commented Sep 11, 2015

Button does not appear to actually have disabled="disabled" set

@carodew carodew added low and removed To be triaged labels Sep 11, 2015
@carodew
Copy link
Contributor

carodew commented Sep 11, 2015

Would be higher if we knew it submitted a form on accident but we don't know that at this point.

@maya
Copy link
Contributor

maya commented Sep 11, 2015

@colinpmacarthur this is the default behavior for buttons in IE, to shift when clicked. Do you want it removed for all? We don't do this in any other browsers.

@maya
Copy link
Contributor

maya commented Sep 11, 2015

Also this is only for button elements, so maybe you can add something in the documentation, that they need to add the disabled attribute?

We wanted this to be usable for any way someone want to use a button, and many people use anchor links and want this style. Another idea is we switch all of our buttons to use anchor links in the example. Bc we don't want that attribute in anchor links. cc @jpyuda

@jpyuda
Copy link
Contributor

jpyuda commented Sep 14, 2015

Links that look like buttons (and vice versa) can be a whole thing, because buttons and links actually behave slightly differently in the browser. Hmm..

@colinpmacarthur colinpmacarthur changed the title [Buttons] disabled button is clickable in IE 10 [Buttons] disabled button is clickable Sep 16, 2015
@maya
Copy link
Contributor

maya commented Feb 6, 2016

I actually think we should add disabled attribute here bc that demonstrates it's unusable and un-clickable.

@carodew
Copy link
Contributor

carodew commented Feb 9, 2016

+1

@patrickcate
Copy link
Contributor

I would suggest adding pointer-events: none to the usa-button-disabled class and button disabled attribute so hover and click events are not registered. Browser support for the CSS property is pretty good:
http://caniuse.com/#feat=pointer-events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug A problem in the code
Projects
None yet
Development

No branches or pull requests

7 participants