neos-ui
neos-ui copied to clipboard
FEATURE: Alert if user closes the browser while saving
and changes are currently persisted
closes #2050
What I did
Added an unbeforeunload handler to the window object
How to verify it
Type, wait until the publishdropdown changes state to saving and try to close the browser, if this is to fast you can uncomment the removing of the unbeforeunload handler in line 36
Hey just stumbled upon this one, in the old UI we had two beforeunload checks. One to check if any AJAX requests were running and one checking if there were any pending changes to be saved (as they were throttled and debounced to avoid constantly sending requests).
See https://github.com/neos/neos-development-collection/blob/master/Neos.Neos/Resources/Public/JavaScript/Content/Components/StorageManager.js#L16
Not sure if that makes sense in the new UI, but do remember @dimaip talking about issues with pending saves at some point.
Good point @aertmann, we should also check this debounce: https://github.com/neos/neos-ui/blob/master/packages/neos-ui-ckeditor5-bindings/src/ckEditorApi.js#L68 But that would be a separate change.
Related issues (about the inspectors pending changes) #3141 #2670
ill continue what you started ;)
Hi @mhsdesign, we have just a couple of days left until feature freeze. Do you still plan to work on that?
then ill pass - 8.3 will do too ;)
Ok thanks :)