OpenWindow() not opening in new tab

The documentation states that OpenWindow() will open a url in a new tab.

On Edge, using OpenWindow() with a coda document URL will result in the page opening in the current tab which is not desired or describe behaviour

Before anyone jumps onto fixing this, please remember that we use OpenWindow() a lot for inside-the-doc navigation like going to a different page, focusing a view, or opening a modal. So it’s actually desired that the provided URL first gets matched against the current document’s router, and only if nothing matches it opens the new tab.

Perhaps a compromise would be to open absolute URLs in a separate tab and relative URLs in current tab. Or best, add an argument to OpenWindow() function to choose whether to open the URL in a separate or current tab.

1 Like

We are using it to show a task list for a document the user is looking at. Our use case is that the user can easily jump to a planning page configured to the page they are looking at while still keeping the coda document page in view.

Having an argument for is opening a new tab, window, or self would be ideal as paul suggested.

I’ll take your suggestion and raise it :slight_smile:
I would like to have an optional argument to choose whether to open the URL in current tab, new tab or new window, there is a valid use case for each of these options