# Perspective Popups not closing

**URL:** <https://forum.inductiveautomation.com/t/perspective-popups-not-closing/116664>\
**Category:** Ignition\
**Tags:** ignition83, perspective\
**Created:** [August 5, 2026, 10:46am UTC](https://forum.inductiveautomation.com/t/perspective-popups-not-closing/116664 "2026-08-05T10:46:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arr](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Arr](https://forum.inductiveautomation.com/u/Arr)\
**Post date:** [August 5, 2026, 10:46am UTC](https://forum.inductiveautomation.com/t/perspective-popups-not-closing/116664/1 "2026-08-05T10:46:22Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a9574075dab305104887afdef8520617191079b1.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/4353d971697257389a626abc5c66b4387a7aa0ec.png)

Thank You

---

<div class="post-metadata">

**Author:** ![liam1](https://avatars.discourse-cdn.com/v4/letter/l/e68b1a/32.png) [@liam1](https://forum.inductiveautomation.com/u/liam1)\
**Post date:** [August 5, 2026, 1:37pm UTC](https://forum.inductiveautomation.com/t/perspective-popups-not-closing/116664/2 "2026-08-05T13:37:32Z")

</div>

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')`

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 5, 2026, 1:40pm UTC](https://forum.inductiveautomation.com/t/perspective-popups-not-closing/116664/3 "2026-08-05T13:40:09Z")

</div>

> [@liam1](#):
>
> if currentValue.value ==True and previousValue.value==False:

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

```python
if currentValue.value and not previousValue.value:

```
