Akryum / floating-vue

💬 Easy tooltips, popovers, dropdown, menus... for Vue
https://floating-vue.starpad.dev/
MIT License
3.26k stars 333 forks source link

Ater updating to v5.1 the v-close-popper directive no longer works #1013

Closed kouts closed 6 months ago

kouts commented 6 months ago

It seems that the change from click to mousedown introduced in v5.1 broke the v-close-popper directive, so clicking on an element that has the directive no longer closes the popper.

Here's a Stackblitz showcasing the issue, you'll notice that the dropdown that uses hide works as expected while the one using v-close-popper does not.

https://stackblitz.com/edit/vue3-tailwind-ad4rfl?file=src%2FApp.vue

I think the issue probably lies here: https://github.com/Akryum/floating-vue/blob/0de649a9e2c00cdc585228ec88420edf8e1257ef/packages/floating-vue/src/directives/v-close-popper.ts#L4

I tried to fork the project and follow the contributing guidelines but I wasn't able to fire-up the dev environment.

kouts commented 6 months ago

Thanks, @antfu for reviewing and @Akryum for merging this. I appreciate you guys for your efforts in keeping this library current.