I'm using the vue-touch-events touchhold function to build a "peek" feature for a iOS & Android app that I'm working on, built using Capacitor JS
The app works well, but there doesn't seem to be a core plugin listed for creating a "peek" feature (where the user long taps and then the phone vibrates and some text appears)
I've got this part woking, but my issue is that on a physical device, on iOS, the long press (touchhold) event is triggering a selection of the text, that's the iOS selection box that's blue and allows a user to choose things such as: copy, paste etc...
I've added the following to my component that wraps the text and/or button that needs to be peeked:
<template>
<div
unselectable="on"
onselectstart="return false;"
v-touch:touchhold="peek"
onmousedown="return false;"
class="tw-select-none">
<slot name="activator"></slot>
</div>
</template>
I'm using Tailwind CSS, but have tried the following:
user-select: none is already appliedonmousedown is set to return falseonselectstart is set to return falseunselectable is set to on::selection,
::-moz-selection,
::-webkit-selection {
background: #000;
color :#fff;
}
Despite all this, I still get the annoying iOS selection box over everything, how can I disable this? Or work around this? Maybe make it transparent somehow?