You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
💥 Internet Explorer
💥 Microsoft Edge
💥 Google Chrome
💥 FireFox
💥 Safari
mobile (iOS/iPadOS)
mobile (Android)
not applicable
other (enter in the "Additional environment details" area below)
Additional environment details
SPFx 1.21.1 (Though it affects all versions of SPFX and first-party SharePoint Web Parts)
Describe the bug / error
When a user clicks a link from Page1.aspx to Page2.aspx and presses the Browser back button mid-navigation event, the SharePoint page lifecycle is not recovering correctly. The Browser URL accurately shows Page1.aspx, but the Web Parts are still trying to load from Page2.aspx
This is causing an issue with our custom web parts which utilize URL parameters. As we load a page such as Page2.aspx?k="" and the Web Parts are loading data based on that... however pressing back changes the URL, but doesn't change the loaded Web Parts. However, to demonstrate, this behavior also exists in first party scenarios using out of the box components.
See below. I click a link from News Web Part, and while it's loading the News page, I press back in the browser. The URL correctly updates, but the page is still loading the previous news page web parts.
SharePoint.navigation.issue.mp4
We can mitigate this issue in custom code by disabling data-interception, however, we cannot control the out of the box experience. Also, disabling data-interception to off is not a great experience due to the performance impact.
This behavior has manifested itself in the past in various ways, but I believe them to all be related: #8913 #5604
Steps to reproduce
Create a News Page
On the home page, add a News Part that loads the News
Click on the News Article
Press back in the browser before the page full loads
Expected behavior
When pressing back in the browser mid navigation event, the SharePoint page should correctly recover the proper Web Parts for the loaded page... whether using first-party web parts or custom SPFx web parts.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
SPFx 1.21.1 (Though it affects all versions of SPFX and first-party SharePoint Web Parts)
Describe the bug / error
When a user clicks a link from Page1.aspx to Page2.aspx and presses the Browser back button mid-navigation event, the SharePoint page lifecycle is not recovering correctly. The Browser URL accurately shows Page1.aspx, but the Web Parts are still trying to load from Page2.aspx
This is causing an issue with our custom web parts which utilize URL parameters. As we load a page such as Page2.aspx?k="" and the Web Parts are loading data based on that... however pressing
backchanges the URL, but doesn't change the loaded Web Parts. However, to demonstrate, this behavior also exists in first party scenarios using out of the box components.See below. I click a link from News Web Part, and while it's loading the News page, I press
backin the browser. The URL correctly updates, but the page is still loading the previous news page web parts.SharePoint.navigation.issue.mp4
We can mitigate this issue in custom code by
disabling data-interception, however, we cannot control the out of the box experience. Also, disabling data-interception to off is not a great experience due to the performance impact.This behavior has manifested itself in the past in various ways, but I believe them to all be related:
#8913
#5604
Steps to reproduce
backin the browser before the page full loadsExpected behavior
When pressing
backin the browser mid navigation event, the SharePoint page should correctly recover the proper Web Parts for the loaded page... whether using first-party web parts or custom SPFx web parts.