Akryum / floating-vue

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

fix: might miss content clicks inside PopperContent #981

Closed DannySu09 closed 1 year ago

DannySu09 commented 1 year ago

While using elk, I found the following button inside the hover card has chances failing to response to mouse clicks.

I made a video screenshot below:

https://github.com/Akryum/floating-vue/assets/3401641/046f4a26-2ab6-4b8f-8113-0adbecbe27a2

And discovered remove the style ponter-event: none can ensure that the click takes effect.

Since the visibility: hidden already made sure that the element won't response to click event, I guess pointer-event: none is no longer needed here.

I'm not sure what is the root cause here, maybe it's because the style pointer-event: none took effect before the browser can take care of the click event.

netlify[bot] commented 1 year ago

Deploy Preview for v-tooltip ready!

Name Link
Latest commit 4918af7cddd0421c73ed32d1bb222026efc108d2
Latest deploy log https://app.netlify.com/sites/v-tooltip/deploys/64dc81efcddf0500086e817b
Deploy Preview https://deploy-preview-981--v-tooltip.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

antfu commented 1 year ago

This does not seem to be the right approach for me. I think instead, on the Elk side, it should have not made the popup disappear upon clicking.

DannySu09 commented 1 year ago

Yeah, seems a bit tricky and didn't solve it clear enough.

BTW, just found the bug is hard to reproduce on https://elk.zone/home, but relatively easy on pnpm run dev.

Anyway, close for the moment.