Skip to content

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

Merged
cjcenizal merged 1 commit intoelastic:masterfrom
cjcenizal:disabled-button-links
May 22, 2018
Merged

Fix bug in which disabled link buttons don't look and act disabled#862
cjcenizal merged 1 commit intoelastic:masterfrom
cjcenizal:disabled-button-links

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

@cjcenizal cjcenizal requested review from chandlerprall and snide May 21, 2018 19:18
@cjcenizal cjcenizal force-pushed the disabled-button-links branch from 075b166 to 19d5adc Compare May 21, 2018 19:32
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

@cjcenizal cjcenizal force-pushed the disabled-button-links branch from 19d5adc to d099bf3 Compare May 22, 2018 16:28
…n didn't exhibit disabled behavior and visual state when href was defined.
@cjcenizal cjcenizal force-pushed the disabled-button-links branch from d099bf3 to 33ec5ff Compare May 22, 2018 16:28
@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