-
Notifications
You must be signed in to change notification settings - Fork 95
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
Ensure files are saved on close #3899
Comments
Sync before saving is what we did in the past and i think it's the least intrusive and easiest change - even though it will require another roundtrip. |
still a thing. |
@blizzz I'm also still noticing this behavior. It's especially troublesome because re-opening the file and clicking the save icon has no effect. The user must first make some other change to the file before clicking the save button, in order for it to actually write anything to disk. Apologies if the fix is still in progress, I don't mean to create a rush! 😅 |
@DavidMikeSimon actually i cannot reproduce this behaviour anymore. Do you have some reliable reproduction steps perhaps? |
@blizzz Here is how I'm able to reproduce it:
Nextcloud version: 27.0.2 |
Thanks @DavidMikeSimon.
|
@blizzz Will unassign you as it looks more like a frontend issue ;) |
Under 28.0.9, we can still reproduce the issue sometimes: When you close a text document without clicking save, a part of your unsaved contents is lost. And: that does not only happen on external storage. |
Describe the bug
Sometimes closing the editor won't save the file.
The sync request goes out but since the version has not increased it does not save anything.
To Reproduce
Steps to reproduce the behavior:
x
to close viewer directly afterExpected behavior
Closing the viewer should always save the file
Will provide logs once i recorded them.
Background
When typing the changes are send out via the push endpoint.
However the version counter will only increment once a sync request happened.
In the meantime save requests will still have the same version and be ignored.
Possible solutions
Increment version on push
We could increase the version whenever we push - but this would require including all intermediate changes by others in the answer to the push request. The version counter is mainly used to not fetch steps over and over again - so we cannot just increase it as that would lead to ignoring relevant steps.
Sync before saving
We could also use two requests for saving - one to ensure the current version is up to date and then one to actually save the file.
The text was updated successfully, but these errors were encountered: