Perspective touchscreen long press context menu

Version: Ignition Edge 8.3.3

I need to have a jog button to run something as long as the button is pressed.
To do this, I made a button with 2 events: onMouseDown and onMouseUp which sets and resets a bit.

This works fine when using a mouse. However: with a touchscreen, I experience right-click behaviour:

I tried disabling the press-and-hold right click setting:

But it still didn’t work. Still get the context menu.

I was reading these topics:

It seems that I need to add the following somewhere to a css file:

* {
-webkit-touch-callout: none;
-webkit-user-select:none;
}

Tried adding it here but doesn’t work:

I’m not sure if I added it in the right place?

Also tried to just add it to the button:

But that also doesn’t work…

I tried Chrome kiosk mode, then I don’t get the context menu. But I also cannot click the button with a long press…

Any help is highly appreciated!

After fiddling a lot more, I found these touch events.
I added the same scripts to set/reset the bit and now it works in Chrome Kiosk mode.

If anyone has a better solution, I’d love to hear about that!

Everyone here will highly suggest you to not use a momentary button at all in perspective. You need to use start and stop buttons to accomplish this as you'll run into issues trying to use a momentary style button beyond what you've already experienced.

2 Likes

Most notably and notoriously that the momentary button will not turn off and leave your tag high