Disabling text selection popup menu without disabling selection altogether

I’m developing a custom e-reader app. I would like to make a custom highlighting menu, but I’m having trouble disabling the “Copy/Paste/Share” menu that pops up when text is selected on mobile devices. As far as I have researched, it seems impossible to disable without disabling selection altogether. But I wonder if by chance anyone has found a workaround.

I am aware of user-select: none which disables all selection. This is not desirable for me because I will need to access the javascript selection API for saving highlights, among other things.

Thanks!