atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
11.97k stars 520 forks source link

tippy on mobile with hideOnClick:true, el.oncontextmenu=()=>instance.show(), tipp appears while touching, disappears ontouchend #1160

Open twilson90 opened 6 months ago

twilson90 commented 6 months ago

Using the latest version, if you use hideOnClick:true and manually trigger a tippy to show on a contextmenu event (right click), on desktop devices it will appear as expected.

On mobile/touch devices however, the contextmenu event is trigger by touching and holding. After about a second of holding, the event is triggered and the tippy shows, but the moment the touch ends it triggers the hideOnClick detection and hides the instance.

Is this a bug? Is there a way round this?