Closed djplaner closed 1 year ago
onDestroy
in CanvasCollections
main.ts
sets it up with addEventListener ('beforeunload' )
Turn of editing appears to be called.
No. All the calls appear to be happening
No. Appears it doesn't check the data - what is the data saying?
It should return
Solutions?
Experiment -
1, generate a "are you sure" if edit on
Use beforeunload -- already are
Not working exactly - can detect it, but question is how to prevent default etc.
two questions
destroy
- i.e. onDestroy
onDestroy
doesn't do anything asycnchronouscheckBeforeUnload
added to CanvasCollections
onDestory
Even when edit is off and there are no changes, we're getting the popup - need to add something more
Tidy up the destroy
Doing a refresh on page isn't releasing the edit on lock in Firefox