tailwindlabs / tailwindui-issues

A place to report bugs discovered in Tailwind UI.
234 stars 4 forks source link

Navigation menu #1524

Closed atlanteavila closed 8 months ago

atlanteavila commented 10 months ago

What component (if applicable)

Describe the bug Using this in a next.js application is not working properly. The popover works, but will not close on click-away/window click nor when selecting items within the pop over group. I'm using Next.js v 13.x and hosting it through vercel.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Live Site'
  2. Click on "Product" on the top navigation (on desktop)
  3. Click away from the menu popover and the item is still visible.

Expected behavior When clicking away from the item, the pop over should close. If I press the escape button, the popover should go away, but it's still visible. The only way to close it is to click the "Proucts' button again.

Screenshots

Browser/Device (if applicable)

Additional context

ACPK commented 9 months ago

@atlanteavila, are you still experiencing the reported issue? If so, could you provide the Vercel page URL for further investigation? I attempted to replicate the problem using the latest version of the code (as of 5 minutes ago) but was unable to reproduce the issue.

On a somewhat related note, I'd like to mention that I don't use the exact code you're referring to on my site. We have revamped the menu to automatically open and close based on the visitor's mouse placement. For a live example, you can check the main navigation bar on intercom.com using a non-mobile screen resolution. If you have any further details or updates on the issue, please share them for a more accurate investigation.

reinink commented 8 months ago

@atlanteavila Hey my apologies for the delayed response on this one. Looking at the website you shared it appears that you got this resolved. Clicking outside of this menu or hitting escape should definitely close it — so I'm hoping this issue was just something related to your specific implementation and that you were able to resolve it.

Going to close this issue for now, but if you are still experiencing any issues here, please provide us with a minimal reproduction and we'll definitely have a closer look.

Thanks! 🤙