microsoft / microsoft/CopilotStudioSamples
Handle SharePoint Links in SharePoint SSO Component
@adilei is already working on this.
Since Sep 4, 2024.
- Dominant language
- TypeScript
- Stars
- 797
- Forks
- 491
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.