web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Prevent HTML links fro...
Power Apps
Answered

Prevent HTML links from opening a new tab

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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'.

 

 

Categories:
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    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 Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks, then how do you do links in PowerApps?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    by using Launch()

     

    this way you can open a URL link. 

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard