Hyperlinking considerations in SharePoint Framework
By default on a modern page in SharePoint when a hyperlink is clicked, navigation to the page is achieved via a page router to avoid full refresh of the screen.
When you develop custom SPFx solutions the behavior of smart navigation might not be desirable, especially for scenarios using the target
attribute to open a page in a separate tab in the browser.
Consider the following markup:
<a href="https://contoso.sharepoint.com/sites/marketing/SitePages/Awesome.aspx" target="_blank">Awesome page</a>
In the above example, the target
attribute will be ignored and the page opens in the same tab via page router logic. In order to override the page router for hyperlinks add the data-interception
attribute to the link with a value of off
.
<a href="https://contoso.sharepoint.com/sites/marketing/SitePages/Awesome.aspx" target="_blank" data-interception="off">Awesome page</a>
When the link is clicked in the above example, the page will open in a new tab.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기