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

[BUG] onTap callback fires when button has disabled prop set to true #3055

Open
michTheBrandofficial opened this issue Feb 9, 2025 · 1 comment · Fixed by #3056
Open
Labels
bug Something isn't working

Comments

@michTheBrandofficial
Copy link

Using the onTap callback on motion.button elements works fine all the time. But it shouldn't fire when the disabled prop of the element is set to true

Code reproduction on Stackblitz : Motion app on stack blitz

Steps to reproduce:

  1. Go to linked reproduction
  2. Open the console to see the logs.
  3. Click on the will not fire button - the onClick handler should not fire (expected when the button is disabled)
  4. Click on the will fire button - the onTap handler fires which is not expected

Expected behavior

The onTap callback handler should not fire when a button is disabled. It should act like a onClick handler.

Environment details

OS: Windows 11 Pro Build 22000.194
Browser: Tested on Firefox and Zen browser
Browser version: Zen v 1.7.6b

@michTheBrandofficial michTheBrandofficial added the bug Something isn't working label Feb 9, 2025
@gs18004
Copy link
Contributor

gs18004 commented Feb 9, 2025

Thank you for your report. I will work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants