djplaner / canvas-collections

Transform Canvas LMS modules by adding structure, visuals, and context
https://djplaner.github.io/canvas-collections/
GNU General Public License v3.0
1 stars 0 forks source link

Release edit lock on refresh not working (Firefox) #268

Closed djplaner closed 1 year ago

djplaner commented 1 year ago

Doing a refresh on page isn't releasing the edit on lock in Firefox

djplaner commented 1 year ago

How is it called

Turn of editing appears to be called.

Questions

Is the async nature thrown off by something that Firefox has problems with?

No. All the calls appear to be happening

Is it actually checking that deletion works

No. Appears it doesn't check the data - what is the data saying?

It should return

It's the async thing - Firefox won't allow it

Solutions?

Can we detect edit on and generate a dialog

Experiment -

1, generate a "are you sure" if edit on

  1. if yes, can this be used to wait for callback to finish - update an element or some such?

Use beforeunload -- already are

Not working exactly - can detect it, but question is how to prevent default etc.

two questions

Design solution

djplaner commented 1 year ago

Too much warning

Even when edit is off and there are no changes, we're getting the popup - need to add something more

Tidy up the destroy