Close current window/tab

We have open a new window, but there seems to be a lack of a corresponding close current window? You can manipulate popup views, but I’ve found it far more comfortable to open a new window to get to certain screens, whether it’s a printable screen, a specification review and sign-off, or whatever. This means there’s no back button to cause all kinds of possible confusion, and there are lots of times when the ability to flip between windows is super helpful. But then they hit the button to finish, and there’s nothing I can do to close the window, they just have to do it themselves. (I guess I could leave a huge modal popup telling them to close this window/tab…)

I also have a specific use-case regarding an XY Graph bug that requires a total view reset to initial state, and the one and only way to get that is by opening a new window to the same page. But of course, I’d then like to close the old one, so it’s not leaving a confusing identical screen behind behind.

There is
system.nav.closeParentWindow(event)
with documentation here which will close the window the button is contained within.

1 Like

Unfortunately, that’s a Vision client method only. I just realized I didn’t specify Perspective in the original post.

There’s not really a “main window” to close in Perspective the way there is in Vision - there’s just a center “viewport” that you navigate around (using view navigation), or you can “switch” to a new page entirely via URL navigation (even if you’re on a particular mounted path, if you URL navigate to that same path it will act as a reload [I’m pretty sure]).

The reason for this is Perspective is actually only a single “page” that loads up when you get the initial ‘loading’ splash with resource delivery. All navigation you do after that is “faked” - the content on the page(s) changes but the browser never really navigates (unless you do a full page refresh, either yourself or with the refresh action) or you perform URL navigation, which is telling the browser itself to change URLs.