Open URL In Another Tab

Hi all,

I am trying to use a text element to open a link in another tab, however the only open external link action opens it in the same tab which navigates the user from my app.

How can I open a link in another tab using an element?

Reece

I believe the only way is to use a link element to open in a new tab instead of using a workflow and action (it’s a constraint by the browser, not Bubble, I believe).

1 Like

I think the workaround is to create a link element that hovers over the element you want to open a new tab.

You can do what @sridharan.s told you
or
you can run javascript on click element:

window.open('https://www.google.com', '_blank');

3 Likes

Great tip @yusaney1!

Definitely using that from now on, thanks @yusaney1!

Agreed with this. Just swap out the text element for a link element. Stylize how you see fit if you want it to resemble a text element.

1 Like

Just to give my $0.02 here, I’ve been using CSS tools to get a button to open a URL in a new tab using the workflow ‘Open in New Window’. I don’t have my computer right now for screenshots, but it should be quite straightforward.