Search code examples
ioscordovasafaritouchtooltip

Empty tooltip on mobile safari (and cordova app) during long tap


I don't know if this is something that can be helped, but when I tap and hold on a web page in mobile safari, or in cordova/phonegap-made apps run in iOS, there is this pretty useless empty "tooltip" popping up close to the top of the viewport, and it only moves horizontally across the screen.

Here is a screenshot of what I'm talking about (that annoying thing circled in red that totally gives away that this is a cordova app)

My question being : is it possible to prevent this behavior, and how ? It seems to not be present on anchor <a> anchor elements but putting anchors all over the place seems like overkill for this. And if anyone knows, just so I go to bed a little less stupid, what is this feature called and what is it for exactly ?

I already have the following css properties in my body

-webkit-user-select: none;

and

-webkit-touch-callout: none;

to prevent the text selection and the copy and save of images.

I've downloaded other phonegap-made apps from the App Store and they too have this feature, so maybe there's no fixing it.

Anyways, thanks for taking the time to read this.


Solution

  • It's a bug on the UIWebview

    It's been fixed on cordova and will be available on next release, but you can use this plugin meanwhile https://github.com/EddyVerbruggen/cordova-plugin-ios-longpress-fix