Single Part App Page doesn't prevent navigation when there are unsaved changes #4550
Closed
1 of 4 tasks
Labels
area:spfx
Category: SharePoint Framework (not extensions related)
status:fixed-next-drop
Issue planned to be fixed in an upcoming release.
Milestone
Category
Expected or Desired Behavior
When editing a Single Part App Page, and there are unsaved changes, navigation should be prevented with a
beforeunload
confirmation prompt as it is when editing a normal Site Page.Observed Behavior
When editing a Single Part App Page, and there are unsaved changes, navigation is not prevented.
Steps to Reproduce
supportedHosts.SharePointFullPage
in its manifest, and add aPropertyPaneCheckbox
in thegetPropertyPaneConfiguration
method. Package and deploy the sppkg like normal.a. Toggle the checkbox on.
b. Alternatively, simply change the value in the built-in Title field.
a. Optionally, click the X button to close the property pane before reloading the browser.
b. Optionally, instead of reloading the browser, click a link in the left side nav bar (e.g. the Pages list)
beforeunload
event, nor with the custom dialog that SharePoint shows when doing the fast navigation.a. Also see that the changed checkbox value and/or Title value is not persisted.
Additional Info
When comparing with a normal Site Page, the Site Page will have a status text saying "Draft not saved" when properties have been edited, and after a few moments will say "Your page has been saved." There is no status text equivalent in an App Page, although after a few moments of toggling the checkbox, you will see the
onPropertyPaneConfigurationComplete
fired. Still, even after waiting for this to fire before reloading the page, the changes are not persisted.The text was updated successfully, but these errors were encountered: