DavidVollmers / Ignis

The Blazor framework for building modern web applications.
https://ignis.dvolper.dev
MIT License
150 stars 8 forks source link

Menu and Popover don't close on button click #7

Closed kengreim closed 1 year ago

kengreim commented 1 year ago

Neither the HeadlessUI Menu nor Popover components are closing when their respective buttons are clicked, as tested on the examples on https://ignis.dvolper.dev/docs/components/headlessUI/. I get the same behavior on both Chrome 116.0.5845.111 and Firefox 117.0.

I think it is because the Click() functions are calling Open() only, instead of checking Menu state and toggling?

PopoverButton.Click(): https://github.com/DavidVollmers/Ignis/blob/589fe64f7dee5ccedd71804982269047575dd1d2/packages/Tailwind/Ignis.Components.HeadlessUI/PopoverButton.cs#L104

MenuButton.Click(): https://github.com/DavidVollmers/Ignis/blob/589fe64f7dee5ccedd71804982269047575dd1d2/packages/Tailwind/Ignis.Components.HeadlessUI/MenuButton.cs#L111

DavidVollmers commented 1 year ago

Good point! I will update this as soon as possible. But probably not before tomorrow.

DavidVollmers commented 1 year ago

Reminder for myself: Adding a trailing slash to a website URL breaks the link. (Probably the static web app configuration)

DavidVollmers commented 1 year ago

This is fixed in version 0.8.3.