daisyui / react-daisyui

daisyUI components built with React 🌼
http://react.daisyui.com/
MIT License
955 stars 103 forks source link

Menu.Item with <a> not behaving correctly (styles) #458

Closed axvemi closed 1 month ago

axvemi commented 1 month ago

I have a case where, if you click on an "a" tag, the background that shows when you hover on it stays.

In this case I have the following structure:

`

Inicio ` As you can see, there is a span there, since it fixes my problem. You can remove it and see the error. That Link component is from "react-router-dom", but it also happens if you use an a tag like this `A link` It only happens inside the Menu.Item directly ![image](https://github.com/user-attachments/assets/677f4d4c-8766-4ad1-ae36-e2c4c7293ce5) It stays with that background color once clicked, and, it's only removed once you click outside of the item.
benjitrosch commented 1 month ago

Hi @axvemi, that is the intended style. What you're describing is the :focus pseudo-class taking effect.