Make sure that the url in the code snippet is your input parameter.
After that do a close page action in your nanoflow call.
The resulting nanoflow would look like this:
Set the action of the link button to call a nanoflow
Create a new nanoflow which has
Your nanoflow will require a input parameter with object of you popup page, so that you can use url value of object attribute
In Link button ,on click event >call microflow in that microflow first use close page activity and then continue your flow.