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

Disabled button inside a popover can still close the popover #2091

Closed
kaiyoma opened this issue Feb 6, 2018 · 1 comment · Fixed by #2758
Closed

Disabled button inside a popover can still close the popover #2091

kaiyoma opened this issue Feb 6, 2018 · 1 comment · Fixed by #2758

Comments

@kaiyoma
Copy link

kaiyoma commented Feb 6, 2018

Bug report

  • Package version(s): 2.0.0-beta.3
  • Browser and OS versions: Chrome 64 on Windows 10

Steps to reproduce

  1. Render a popover with a Button inside
  2. Set the pt-popover-dismiss class on the Button and also disabled={true}

Actual behavior

The button appears to be disabled, the mouse cursor changes when hovering over the button, but clicking causes the popover to close.

Expected behavior

The button should be disabled, the mouse cursor should change when hovering over the button, and clicking should do nothing.

According to the Blueprint Button docs:

Button uses the native disabled attribute on the tag so the browser disables all interactions ...

If all interactions are being disabled, how does clicking cause the popover to close?

@giladgray
Copy link
Contributor

@kaiyoma perhaps remove the pt-popover-dismiss class from the disabled button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants