# Perspective Popup zIndex

**URL:** <https://forum.inductiveautomation.com/t/perspective-popup-zindex/34309>\
**Category:** Ignition Early Access\
**Created:** [April 29, 2020, 5:12pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-zindex/34309 "2020-04-29T17:12:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianboudreau](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brianboudreau/32/6528_2.png) [@brianboudreau](https://forum.inductiveautomation.com/u/brianboudreau)\
**Post date:** [April 29, 2020, 5:12pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-zindex/34309/1 "2020-04-29T17:12:08Z")

</div>

I am having issues from time to time, where a popup goes behind another popup in perspective.  
Can i use zIndex or can i request focus for popup in perspective.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 29, 2020, 5:26pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-zindex/34309/2 "2020-04-29T17:26:37Z")

</div>

Perspective Popup z-index is based on which was most-recently provided focus.  
If Popup A is open and you open Popup B, Popup B receives focus on open, so it’ll be on “top”. If you then click Popup A, focus moves from B to A, so now Popup A will be on top. There is now way to request focus for a popup, although you could hijack the focus by closing and immediately re-opening the Popup in question.

```auto
# This would close 'PopupA' and then immediately re-open it, providing the illusion of focus.
system.perspective.closePopup(id='PopupA')
system.perspective.openPopup(id='PopupA')

```

---

<div class="post-metadata">

**Author:** ![brianboudreau](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brianboudreau/32/6528_2.png) [@brianboudreau](https://forum.inductiveautomation.com/u/brianboudreau)\
**Post date:** [April 29, 2020, 6:42pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-zindex/34309/3 "2020-04-29T18:42:49Z")

</div>

It kind of works if my popup window PopupA isn’t open it closes the other popup.  
if it isn’t open it closes all open popups.  
Not what i wanted.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 29, 2020, 8:09pm UTC](https://forum.inductiveautomation.com/t/perspective-popup-zindex/34309/4 "2020-04-29T20:09:56Z")

</div>

Ah, that’s a side-effect of a bug that was fixed in 8.0.13. I forgot that could be an issue prior to that (upcoming at this point) release. Prior to 8.0.13, there is no way to mimic focusing a popup.
