Perspective Popups not closing

Hi,

In my application I have some confirm popups that close after clicking Cancel or Yes (2 seconds after clicking Yes and immediately after clicking Cancel). The fact is that sometimes the popup does not close after clicking Yes (even if 2 seconds passed). How to solve it?

There are following properties in these popups: "close", "edge" and "StartTime". If "edge" detects falling edge of a Tag (Tag is bound to "edge"; Tag is set when button Yes is being hold and reset when the pointer is up or leave) then current time is assigned to "StartTime". If "edge" detects rising edge then "StartTIme" is Null. Property "Close" has expression binding. If the difference between current time and "StartTime" is greater than 2 seconds then the popup is closed.

Thank You

Instead of using a transform after your expression dateDiff({this.custom.startTime},now(),"seconds")>=2 , add a onChange script to the expression .When it changes from false to true it triggers the popup to close.

For example
if currentValue.value ==True and previousValue.value==False:
system.perspective.closePopup('Test')

Don't compare to True or False. This should be:

if currentValue.value and not previousValue.value: