# Close Perspective Dock on Loss of Focus

**URL:** <https://forum.inductiveautomation.com/t/close-perspective-dock-on-loss-of-focus/33229>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [March 18, 2020, 10:04pm UTC](https://forum.inductiveautomation.com/t/close-perspective-dock-on-loss-of-focus/33229 "2020-03-18T22:04:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rberghammer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rberghammer/32/7150_2.png) [@rberghammer](https://forum.inductiveautomation.com/u/rberghammer)\
**Post date:** [March 18, 2020, 10:04pm UTC](https://forum.inductiveautomation.com/t/close-perspective-dock-on-loss-of-focus/33229/1 "2020-03-18T22:04:27Z")

</div>

I have a docked view that opens when a user clicks an object on the main view. Is there a way to close the docked view when it loses focus? (i.e. the user clicks on something else on the main view)

I would prefer a solution that does not involve a script when clicking the main view. I have lots of main views and I don’t want to have to configure this script to activate in every possible place the user may click.

I’m hoping there is just a setting I’m missing for loss of focus.

---

<div class="post-metadata">

**Author:** ![kyle.demerath](https://avatars.discourse-cdn.com/v4/letter/k/5e9695/32.png) [@kyle.demerath](https://forum.inductiveautomation.com/u/kyle.demerath)\
**Post date:** [March 19, 2020, 1:56pm UTC](https://forum.inductiveautomation.com/t/close-perspective-dock-on-loss-of-focus/33229/2 "2020-03-19T13:56:47Z")

</div>

I suspect part of the issue for you may be a bug that I also had noticed. Docked views aren't opening in modal correctly when they are set to modal if they are opened using a button. If it opened in modal correctly then it would close as soon as someone clicks outside of that docked view. There was another post like this. The bug is still open.

> [@\[BUG-13632\] Perspective - Docked view modal fail](http://forum.inductiveautomation.com/t/bug-13632-perspective-docked-view-modal-fail/24882/12):
>
> This is the description of the bug which was opened a long while ago, and that bug has not been resolved as of yet. This thread should be updated when that happens. Unfortunately, no, because when you’re working with a component, you are within a View. Views have absolutely no idea they will be used as a “Page”, because there is every possibility that they will not be. Essentially, the View you are within knows ONLY about View properties, which include its children and any of their properties…

---

<div class="post-metadata">

**Author:** ![rberghammer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rberghammer/32/7150_2.png) [@rberghammer](https://forum.inductiveautomation.com/u/rberghammer)\
**Post date:** [March 19, 2020, 3:04pm UTC](https://forum.inductiveautomation.com/t/close-perspective-dock-on-loss-of-focus/33229/3 "2020-03-19T15:04:58Z")

</div>

Thanks. That makes sense.
