-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset autosave timer when interval changes (#35639)
Previously, there was no way to disable the autosave timer created within `AutosaveMonitor`'s `componentDidMount` hook. This resulted in unexpected remote drafts to be saved from within the native editor's Unsupported Block Editor (UBE) after the timer's 60 seconds elapsed. The UBE loads the web-based editor within a web view and leverages `autosaveInterval` to prevent autosave creating remote drafts. This change enables clearing the initial autosave timer by modifying `interval` via `autosaveInterval`. Now, when the `interval` changes the previous timer is cleared and a new timer is created with the new `interval`.
- Loading branch information
Showing
2 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters