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

Wrong UI on Buttons with "to" property when disabled #1591

Closed
jsayer101 opened this issue Mar 31, 2024 · 4 comments
Closed

Wrong UI on Buttons with "to" property when disabled #1591

jsayer101 opened this issue Mar 31, 2024 · 4 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@jsayer101
Copy link

Environment


  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 3.11.1
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.5
  • Package Manager: npm@10.2.3
  • Builder: -
  • User Config: modules
  • Runtime Modules: @nuxt/ui@2.15.0
  • Build Modules: -

Version

v2.15.0

Reproduction

https://stackblitz.com/edit/nuxt-ui-bx4vr7

Description

Using the attribute "to" and disabling a button create a bug where the button is functionally disabled but the UI doesn't really reflect the change (wrong cursor and hover effects).

Additional context

No response

Logs

No response

@jsayer101 jsayer101 added the bug Something isn't working label Mar 31, 2024
@jsayer101 jsayer101 changed the title Bug on Buttons with "to" property when disabled Wrong UI on Buttons with "to" property when disabled Mar 31, 2024
@moshetanzer
Copy link
Collaborator

Screen.Recording.2024-03-31.at.16.53.42.mov

@jsayer101 see above seems to be working correctly?

@moshetanzer
Copy link
Collaborator

@jsayer101 you can add custom hover styles using css 😄 . Closing this for now.

@jsayer101
Copy link
Author

@moshetanzer

@jsayer101 you can add custom hover styles using css 😄 . Closing this for now.

Yes, I can, but shouldn't it be the default behavior ? There shouldn't have any difference while using a link...

Disabled should be disabled, without any hover effects...

@sandros94
Copy link
Collaborator

also duplicate of #473, you can read more at this comment's link

This will make the link semantically valid. However, the styling will not be applied as Tailwind CSS disabled variant can't be used for this case.

Followed recommendations from this article: https://www.scottohara.me/blog/2021/05/28/disabled-links.html

@sandros94 sandros94 added the duplicate This issue or pull request already exists label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants