-
Notifications
You must be signed in to change notification settings - Fork 58
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
Autosave stops working when typing fast #2349
Comments
It looks to me like this issue was introduced with #2285. @dratwas, do you think we can just revert that PR for the 15.0 release of the main apps, or will that lead to side effects (or maybe there's a better fix)? cc: @mkevins , @chipsnyder |
Hey, @mchowning I created a PR where i revert these changes WordPress/gutenberg#22933 . W can simply revert them since the slider PR WordPress/gutenberg#22421 is not merged yet. |
Went back and looked at the bisect again and I’m seeing similar results, but it’s a bit more complicated than I originally realized. On the commit for the transient edit changes (9ecd115), if I enter a bunch of characters in rapid succession, the post is saved once at the very beginning and it never saves again as long as I keep entering characters quickly. I can even let the editor sit after quickly entering the characters, and it never saves most of the characters unless I start typing again. On the commit before the transiet edit changes (9ecd115~1 or b193c71) even if I enter the characters quickly the saving happens, but the saving seems like it is a bit delayed. So if I enter a bunch of characters quickly and then immediately publish the post, the last 10-20 characters are lost. If I wait ~5 seconds after entering the characters quickly though, all the content gets saved. |
Tested a 14.9 release build on a physical Pixel 1 and I was not able to recreate the delayed save losing content issue. Would be good to test this on a very slow device though. The fact that Android doesn't get the latest post content before publishing is still a problem even though this is not a new issue and seems like it probably does not need an immediate hotfix. This explains why this issue was only observable on iOS since iOS always retrieves the full post HTML before publishing whereas it appears that Android only publishes what has already been saved. Let's leave this issue open until we update Android to also retrieve the full HTML content before saving. |
In addition to @mchowning comment. I'm able to reproduce the issue with the delay on release build but on the emulator, so I think it could be still an issue on low-end Android devices. The gif below present that behavior: |
Reopening this because we still need to address Android's failure to retrieve the latest HTML content before publishing. |
Quick update on this. There were some concerns about adding the save-on-exit functionality on Android initially, but there is agreement on a path forward for adding it now. I worked on implementing that last week, but it’s not done yet. With me being on groundskeeping this week (and it being a short week with the team AFK) I probably won’t get back to it until next week. Also, even with the Android save-on-exit fix, we should still make sure that when we merge the selectionStart and selectionEnd changes, we still address the issue it introduced where change notifications were not sent to the main apps when a user typed quickly, since that prevents the autosave functionality from working on both platforms. The good thing is that addressing the not sending change events to the main apps would mean that Android adding the save-on-exit change is no longer a blocker, although it still needs to be done (and I am working on it). cc: @pinarol |
The PR for Android to always save the post when exiting the editor has been merged, so I believe that wraps up all the work associated needed for this. |
Describe the bug
When quickly entering text into a block (paragraph, verse, etc.), the autosave mechanism stops working. As a result, immediately publishing a post after quickly entering the text results in the loss of most of the text that was quickly typed. This issue only seems to be reproducible on Android for some reason.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All content should be saved.
Smartphone (please complete the following information):
Additional context
h/t to @guarani and @malinajirka for identifying this issue. 🙇
Related discussion in Slack starting here: p1591281221117400-slack-mobile-gutenberg
The text was updated successfully, but these errors were encountered: