neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

FEATURE: Alert if user closes the browser while saving

Open mstruebing opened this issue 7 years ago • 6 comments

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

mstruebing avatar Aug 08 '18 06:08 mstruebing

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.

aertmann avatar Aug 22 '18 16:08 aertmann

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.

dimaip avatar Aug 22 '18 17:08 dimaip

Related issues (about the inspectors pending changes) #3141 #2670

ill continue what you started ;)

mhsdesign avatar Oct 23 '22 20:10 mhsdesign

Hi @mhsdesign, we have just a couple of days left until feature freeze. Do you still plan to work on that?

markusguenther avatar Nov 14 '22 07:11 markusguenther

then ill pass - 8.3 will do too ;)

mhsdesign avatar Nov 14 '22 08:11 mhsdesign

Ok thanks :)

markusguenther avatar Nov 14 '22 08:11 markusguenther