New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove page lock when leaving the editing page #2514

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@peterfromearth
Contributor

peterfromearth commented Sep 22, 2018

fix issue #2493

@phy25 phy25 changed the title from Issue2493 to Remove page lock when leaving the editing page Sep 22, 2018

@phy25

Thank you for your contribution. I have to figure out the lock mechanism before I can accept this change.

Is it possible to merge the two AJAX requests into one? Also I prefer to use navigator.sendBeacon first while use sync AJAX as a fallback.

@peterfromearth

This comment has been minimized.

Contributor

peterfromearth commented Sep 23, 2018

I added a check for sendBeacon and use it as the preferred version. Is there a better way to add the data then using FormData?

As releasing the lock using the existing call draftdel is not intuitive, instead of adding unlock I could add a draftdelAndUnlock call. What do you think?

Besides we have to rename some functions in edit.js - there is a variable window.keepDraft and the function is called deleteDraft(). How do we handle this with backward compatibility?

@phy25 phy25 dismissed their stale review Oct 12, 2018

JS concern resolved. I am unable to decide on the lock mechanism improvements now.

@phy25

This comment has been minimized.

Collaborator

phy25 commented Oct 12, 2018

Sorry for the delay. I am unable to decide on the lock mechanism improvements now, and maybe someone who is more familiar with it can have a say.

@mprins

This comment has been minimized.

Contributor

mprins commented Oct 15, 2018

This PR also removes the draft version, having that around until the session expires is actually a feature, because it makes it possible to return to the edits after a browser crash - as long as the session is still valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment