cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Prevent HTML links from opening a new tab

I am using a simple anchor link and mailto link, in an HTML Text control:

 

"Primary Contact: <a href=#>" & PrimaryContact.first_name & " " &PrimaryContact.last_name & "</a>

<br>" & "Email: <a href=mailto:" & PrimaryContact.email & ">"& PrimaryContact.email &"</a>"

 

Both of them cause my browser (Chrome) to open a new tab. The anchor link opens PowerApps Studio in a new tab. Why? I want the anchor link to simply select an item in my gallery. And I've set Outlook desktop as my default email client so not sure why it opens a blank tab for that either (although it does open Outlook too)?

 

Is there a way to prevent HTML links from opening a new tab when used in powerapps? I know I could use blue, underlined text as a workaround but then the mouse pointer doesn't change when you hover over the 'link'.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Prevent HTML links from opening a new tab

Hi @Anonymous 

 

If you want to open the links in another tab, you can use Launch("URL") function. By using Launch all the pages will be opened in a single tab, but if you want to open different URLs in different tabs, then you can use Download("URL").
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: Prevent HTML links from opening a new tab

Hi @Anonymous ,

Do you want to prevent opening a new tab by clicking on the html text?

Have you set the html text's OnSelect or other properties?
If you do not set the html text's OnSelect to Launch function(for example), it will not open a new tab by clicking on the control.

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Prevent HTML links from opening a new tab

Hi @v-yutliu-msft,

 

I'm not using OnSelect or Launch, just the raw html. And I don't want any tab to open when I click on either link.

Highlighted
Dual Super User
Dual Super User

Re: Prevent HTML links from opening a new tab

Hi @Anonymous 

 

As per microsoft documentation, they have suggested not to use <a> anchor tag in the HTML texts, they do not perform as expected.  The TabIndex system in PowerApps does not consider elements inside HtmlText. 
dnl.png

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Anonymous
Not applicable

Re: Prevent HTML links from opening a new tab

Thanks, then how do you do links in PowerApps?

Sijts
Level 8

Re: Prevent HTML links from opening a new tab

by using Launch()

 

this way you can open a URL link. 

Dual Super User
Dual Super User

Re: Prevent HTML links from opening a new tab

Hi @Anonymous 

 

If you want to open the links in another tab, you can use Launch("URL") function. By using Launch all the pages will be opened in a single tab, but if you want to open different URLs in different tabs, then you can use Download("URL").
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,598)