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:
We have an issue with longpress on buttons on touchscreen HMI using perspective. A copy Menu popsup ? we have disabled "right mouse" emulation under control panel "touch and pen" we want to use the buttons for jogging motors. Problem occurs on any button including navigation buttons.
We use a lot of mousedown/mouseup events on our old mobile module on Ignition v7.9. This allows us to set a OPC tag to 1 on mousedown, and then 0 on mouseup. (Moving equipment from iPad screen). I’m trying to recreate this on perspective.
I use the onTouchStart event and onTouchEnd event to accomplish this. I couldn’t get the onMousedown and onMouseUp events to work with Perspective properly. While it works, since now it’s HTML5 i guess, I can get a popup on the iPad when I hold down the button…
I am currently developing a Perspective app using Ignition 8.1 and using a Google Chrome on a Phoenix HMI Panel PC (has Windows 10 OS) for the session. One of the pages has a set of buttons used for motor control; hold down to write high to the PLC tag, release to write low to the PLC tag.
If the button is held down for an extended duration, the right click context menu will pop up. I've disabled the NoViewContextMenu flag in the registry editor though this seems to just disable the right click…
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