Suppress "Copy, Lookup, Translate, Share ... "

I use JQuery textboxes for entering data for my applications. This worked very well in the past, but with recent versions of iOS when I tap on one of the textboxes I now see the last character being highlighted and the Apple “Copy, Lookup, Translate, Share…” dialog pops up.

When I tap the textbox (Jquery) it calls up a custom keyboard I made for numeric entry (allowing the “-” sign and “e” for exponent).

Here’s a sample of my “onclick” code for the textbox:

Function enterPressure_onclick()"block"
  enterPressure.setSelectionRange(Len(enterPressure.value)-1, Len(enterPressure.value))
End Function

When I tap the textbox I’d like the behaviour to be the same as for earlier versions of iOS. No text selected and no "Copy, Lookup … " dialog popping up. Any help would be greatly appreciated.


Bob Anderson

Tip : If you’re pasting code, html or config files, surround the code with triple back ticks (```), before the first line and after the last one. It will be formatted properly. (We fixed it for you this time)

Do you mean the jQuery Mobile TextBox?

Please do not use these. The authors abandoned them years ago. jQM relies on a badly obsolete and insecure version of jQuery.

Yes, JQuery Mobile.

I’m slowly converting the app to BS4, but the BS4 Input box is pretty ugly, so I’m not quite there yet. I’d like to get this issue using JQuery Mobile fixed and then take my time to find a better BS4 approach.


Try this CSS:

*:not(input):not(textarea) {
  -webkit-user-select: none;  /* disable selection/Copy of UIWebView */
  -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */

I haven’t been programming for 5-6 years and it turns out that it’s not like riding a bike :slight_smile: Feeling like a complete noob.

Where would this CSS go? In the TextBox “Style” property or somewhere in the form code?



Well … it looks like the issue is that the line:

enterPressure.setSelectionRange(Len(enterPressure.value)-1, Len(enterPressure.value))

isn’t needed anymore and is what causes the issue. With this statement the last character in the textbox is selected, causing the callout to appear. I removed the statement and everything works as it did in the past. Weird that for earlier versions of iOS and AppStudio the statement was required.

Now off to find a way to get rid of these, Tooltips and a Select!

the css will get rid of the tooltips and select.

I just replaced all of my JQuery Mobile ToolTips with BS4 buttons with popups. Too bad it had to be done since the JQM ToolTips are a lot better as you can change the “tip” at runtime. Sad to update an app with fewer features. Just remarked out all of my old code to hang on to it in the event the popBody property becomes editable during runtime in the future.

The BS4 Input boxes are also pretty ugly for data entry compared to using a JQM TextBox. Can’t believe you can’t even set the corners to “square” in the properties window. Oh well … that’s progress I guess! LOL