react-contexify icon indicating copy to clipboard operation
react-contexify copied to clipboard

Does not work well with "longpress" libraries

Open derwaldgeist opened this issue 3 years ago • 3 comments

I want to implement a mobile-friendly context menu, pretty much like the one of WhatsApp or Telegram. Which means: the menu should show up once you press and hold for a second. I managed to connect react-contexify to a long press library (use-long-press for React). But the menu shows two strange behaviours in this scenario:

  1. It seems to spawn not only one menu, but several menus stacked over each other. At least it looks like this, because the shadow is pretty intense

  2. The menu disappears once I release the mouse button / finger after the long press action. It only works within a certain time frame, so you have to be pretty careful about how long you press to make it actually work.

It would be awesome if the library would support such a long press scenario. It's actually pretty hard to find other context menu libraries that are still maintained.

derwaldgeist avatar Feb 15 '22 09:02 derwaldgeist

Hey @derwaldgeist, I'll see if I can do something for the next release about this

fkhadra avatar Nov 03 '22 19:11 fkhadra

Thanks for your feedback! Do you have plans for a next release?

derwaldgeist avatar Mar 21 '23 16:03 derwaldgeist

@derwaldgeist can you provide a codesandbox to reproduce the issue?

joaquinwojcik avatar Mar 26 '23 17:03 joaquinwojcik