Popup Prematurely Closing

I have a curious problem/issue, This popup:

image

It is being opened by this script running in an expression:

if({this.props.style.classes} = 'TubeLoadFailed' && {session.custom.IP_Address} = '172.29.184.160',runScript("system.perspective.openPopup('','Tube_Load_Failed_PopUps/411_tube_load_failed')"),'')

The IP is so that it displays on the correct touch panel, this project is heavy on the indirection by IP address'.

The popup will seem to randomly close with out having to press the "CLOSE" button on the popup itself. The reason this is an issue because the "CLOSE" button makes false the tag that triggers the props.style.classes 'TubeLoadFailed' from the expression, so when it becomes true again then the popup can "popup".

Any ideas on why it may seem to be randomly closing?

Ignition's expressions do not short-circuit. Your runScript is likely running a lot more than you think. Evaluate the conditions within a script, not in the expression.

Ive been looking and just not sure. I use the same expression to call another script for a popup in the same manner. The only difference is the tube load popups are in a folder where as the other popups are not.

Well, I made the popup happen on a change script of the component ad its working like it should, doesnt close until I want it to.