# Navigation Sticking

**URL:** <https://forum.inductiveautomation.com/t/navigation-sticking/105700>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 29, 2025, 7:54pm UTC](https://forum.inductiveautomation.com/t/navigation-sticking/105700 "2025-04-29T19:54:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgratz](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@dgratz](https://forum.inductiveautomation.com/u/dgratz)\
**Post date:** [April 29, 2025, 7:54pm UTC](https://forum.inductiveautomation.com/t/navigation-sticking/105700/1 "2025-04-29T19:54:48Z")

</div>

I have a docked window with several buttons that I'm using to navigate between my main screens using a simple script.

```python
system.nav.swapTo('Maps/Area_2')
print("Mini Map 2-2")

```

Most of the time, this navigation works seamlessly. About 5% of the time, my client will refuse to _open a specific window_, and it's a different window every time.

I know the button's script is executing (I added that console print statement to check this). I know that it is an issue with the screen that I'm attempting to navigate to (I have several buttons that all navigate to the same screen, and they all pass/fail together).

The issue resolves itself when I navigate to a _different_ screen and then to the screen I originally wanted to go to. Even reloading the current main screen resolves this sticking issue.

In that sense, it isn't halting production, but I hate to leave a nuisance bug like this in the program, especially one that comes up as often as this one does. Does anyone have any ideas about what could be going wrong?

---

<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:** [April 29, 2025, 8:19pm UTC](https://forum.inductiveautomation.com/t/navigation-sticking/105700/2 "2025-04-29T20:19:36Z")

</div>

Are you sure all of your navigation is using `system.nav.swapTo()`? If any main window is opened with `system.nav.openWindow()`, it breaks the system tag that the navigation components depend on to know what is happening. When you get into this situation, check the menubar's "Window" section to see what is currently open. It should only show your docked windows and the **one** main window under normal conditions. If there are two main windows shown, the standard nav components will get confused.

---

<div class="post-metadata">

**Author:** ![jay](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jay](https://forum.inductiveautomation.com/u/jay)\
**Post date:** [April 29, 2025, 10:10pm UTC](https://forum.inductiveautomation.com/t/navigation-sticking/105700/3 "2025-04-29T22:10:03Z")

</div>

And make sure the windows you think are main windows really are setup to be that way:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/4/4431a62f4748286ab26c9a55e8eb35822e841565.png)  
otherwise the windows can open up behind another window.

---

<div class="post-metadata">

**Author:** ![dgratz](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@dgratz](https://forum.inductiveautomation.com/u/dgratz)\
**Post date:** [May 1, 2025, 2:14pm UTC](https://forum.inductiveautomation.com/t/navigation-sticking/105700/4 "2025-05-01T14:14:21Z")

</div>

I found one window that was scripted with openWindow() instead of swapWindow().

Watching the open windows menu showed there there was an extra Main Window open, and this caused the issues I was experiencing.

Thank you!
