floating-vue icon indicating copy to clipboard operation
floating-vue copied to clipboard

Hold press to show tooltip

Open auctumnus opened this issue 2 years ago • 3 comments
trafficstars

I'm trying to use this library to make a wrapper that follows Material 3, but I need to be able to have the tooltip appear on a long press, the way that the design system describes, but I'm not sure that this is possible through this library. Normally, I could solve this by adding my own logic to shown and so on, but a slot won't take an event listener.

I'm not sure what the API would look like for this, and it seems like a really specific use case, so I'm unsure how well this fits, but it's impossible to do it without the internals.

auctumnus avatar Aug 03 '23 15:08 auctumnus

Normally, I could solve this by adding my own logic to shown and so on, but a slot won't take an event listener.

Not sure why you couldn't implement what you are looking for

Akryum avatar Aug 13 '23 14:08 Akryum

ended up doing this with an extraneous <div> around the target slot which i feel like i should not need to do

auctumnus avatar Aug 16 '23 17:08 auctumnus

You can put :triggers=[] and control the popper however you like, for example by adding event listeners on the button in the default slot.

Akryum avatar Aug 31 '23 12:08 Akryum