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

Button Component Hover State Persistence on Mobile When Disabled #12002

Open
philippeaka opened this issue May 14, 2024 · 0 comments
Open

Button Component Hover State Persistence on Mobile When Disabled #12002

philippeaka opened this issue May 14, 2024 · 0 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@philippeaka
Copy link

Summary

We have identified an issue with the Button component. On mobile devices the hover state classes are not consistently removed when the button is disabled. This creates an unintended visual effect, potentially confusing users about the button's functionality

Expected behavior

When the button is disabled, all hover state classes should be removed immediately, ensuring the button correctly reflects its disabled status without any hover state styling.

Actual behavior

This is the actual behavior on mobile devices

disabled-state.mov

Code :

  const [loading, setLoading] = useState(false);
  <Button
      disabled={loading}
      loading={loading}
      onClick={() => setLoading(!loading)}
      variant="primary"
    >
      Add product
  </Button>

Steps to reproduce

Link to sandbox : sandbox

  1. Access the link on a mobile device
  2. Click on the button

Are you using React components?

Yes

Polaris version number

No response

Browser

No response

Device

iPhone 15 Pro

@philippeaka philippeaka added Bug Something is broken and not working as intended in the system. untriaged labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant