pivotal-cf/pivotal-ui

Fieldset[disabled] does not disable* buttons

cameronmoreau opened this issue · 1 comments

What version of Pivotal UI are you using?

17.1.2

What browser and version are you using?

Chrome
Version 71.0.3578.98 (Official Build) (64-bit)

What behavior are you seeing?

In a disabled fieldset, buttons do not appear to be disabled.

Here's an example you can paste into The PUI Editor

<fieldset disabled>
  <input />
  <button onClick={() => alert('rip2')}>hello?</button>
  <PrimaryButton onClick={() => alert('rip')}>Create Thing</PrimaryButton>
</fieldset>

What do you expect to see?

When the following HTML exists on the page, we expect the button to look disabled and onClick to be disabled as well.

<fieldset disabled>
  <PrimaryButton onClick={() => alert('rip')}>Create Thing</PrimaryButton>
</fieldset>

For anyone experiencing this issue as well, here's a CSS snippet that helped us move on

fieldset[disabled] .pui-btn {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

/cc @jberney

It looks like this was fixed in v18+ from this commit c545874

Please re-open if you are still facing this issue.