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

Fix bug in which disabled link buttons don't look and act disabled #862

Merged
merged 1 commit into from
May 22, 2018

Conversation

cjcenizal
Copy link
Contributor

If href was defined on a button, then it would be rendered as an <a>, which doesn't recognize the disabled attribute, and would therefore be unaffected by our styles which use this attribute in their selectors.

I fixed this by rendering a <button> element instead, when isDisabled=true. This is a bit of a hack, but I think it's the cleanest solution, and I couldn't think of any side effects.

image

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…n didn't exhibit disabled behavior and visual state when href was defined.
@cjcenizal cjcenizal merged commit 0ddd0bc into elastic:master May 22, 2018
@cjcenizal cjcenizal deleted the disabled-button-links branch May 22, 2018 18:20
chandlerprall pushed a commit to chandlerprall/eui that referenced this pull request May 24, 2018
…n didn't exhibit disabled behavior and visual state when href was defined. (elastic#862)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants