Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle SharePoint Links in SharePoint SSO Component #242

Open
lifan0127 opened this issue Sep 4, 2024 · 1 comment
Open

Handle SharePoint Links in SharePoint SSO Component #242

lifan0127 opened this issue Sep 4, 2024 · 1 comment

Comments

@lifan0127
Copy link

When the SharePoint SSO Component handles click on a SharePoint internal link, the target="_blank tag is not honored and the link will open in the same window, disrupting the current conversation. The following blog article provides more explanation:

https://julieturner.net/post/spfx-anchor-tags/

Posted on August 8, 2018 | 2 minutes | 418 words | Julie Turner
If you’re developing SharePoint Framework web parts you may have run across an issue whereby your anchor tags will not honor the target=”_blank” attribute allowing you to open a url in a new browser tab. The issue manifests itself only when your goal is to open another SharePoint page from a SharePoint page, i.e. the href is in the SharePoint domain. The reason for this is SharePoint’s built in but rather complex Page Router. Basically, the Page Router is the mechanism by which pages are rendered in SharePoint. In the most basic terms a component sits between you and a page refresh providing logic to how much and when parts of the page need to be loaded. What that means for you is that when you are trying to load a SharePoint page the router steps in and “decides” how it will be rendered and because of this the target attribute is ignored.

@adilei
Copy link
Collaborator

adilei commented Sep 6, 2024

Thanks! Hopefully will have time to add this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@lifan0127 @adilei and others