The new “Warn users if page has unsaved changes” feature has been extremely helpful. Unfortunately, we are running in to an issue with pages that have “helper” models that will never be saved. In this case, if the user doesn’t change anything on the page, they still encounter the warning because there is a model (manipulated programmatically client side) that triggers the warning.
Would it be possible to add a “track” changes option to each model that would be incorporated in the “unsaved changes” check on beforeunload? Or some other similar concept or is there a workaround that could be used?
I have granted login access. Sample page is SampleUnsavedChangesWarningRepro
Steps to reproduce:
1) Create a tab page on Account
2) Add a JS Inline resource with the following code:
** Note that the same behavior exists if the model is defined in page builder and then manipulated (e.g. createRow/updateRow) in code
(function(skuid){ <br>// The below is for demonstration purposes only<br>// and is not to be considered production consumable code<br>// Only intended to demonstrate unsaved warning will be triggered<br>var $ = skuid.$;<br>var clientSideModel = new skuid.model.Model();<br>clientSideModel.id = 'clientSideModel';<br>clientSideModel.recordsLimit = 1;<br>clientSideModel.fields = i<br> { id: 'Color__c' }<br>];<br>clientSideModel.initialize().register();<br>var row = clientSideModel.createRow();<br>clientSideModel.updateRow(row, 'Color__c', 'blue');<br>})(skuid);
- Preview the page
4) Navigate away by choosing any link available making sure to say on the current window
Actual Result:
Unsaved changes will be lost warning is encountered
Desired/Expected Behavior
No warning is encountered
Thank you!