Open Window using flow and JS

I’m using DO spaces and the S3 server connect and trying to create a download button in a table.

I’d like for the download to open in a new tab in the browser each time. The button runs the server connect to get the DO url. On success it runs a JS function to open the url in a new tab. This works perfectly the first time it runs. However if I try to view a second document I get:

The on success code is:
dmx-on:success="run({runJS:{function:'openTab',args:[download.data.signDownloadUrl1,download.data.id],name:'openTab'}})"

JS function is:

function openTab(url, id) {
    console.log(url);
    console.log(id);
    openTab = window.open(url, "_blank");
}

This looks to be a security measure, but it seems odd it should run once. Any thoughts on how to work around it?

Community Page
Last updated: