Alert user if page content has changed since their last draft



Mozilla Developer Network
2 years ago
6 months ago


(Reporter: shobson, Unassigned)






2 years ago
When the user restores a saved draft it restores the entire page contents, not just what they changed. The potential exists for restoring a saved draft to over-write a different user's changes to the page.

We should alert the user if changes have been made to the page since their draft was saved and encourage them to discard it.
Severity: normal → enhancement
Keywords: in-triage

Comment 1

6 months ago
Commit pushed to master at
Add revision tracking to drafts, remove button, remove from new page

The goal of this PR is to make the auto save drafting feature reliable.

Fix Bug 1264314: Alert user if page content has changed since last draft
- revision ID is now saved when draft saved
- displays warning message if revision ID is old
- displays note if revision ID is old
Fix Bug 1298399: Remove ?document_saved
- query variable now includes revision ID of draft to delete
- query variable now directly consumed by javascript
- query variable new removed after draft deleted
Fix Bug 1268906: Tool bar buttons now trigger draft saves
- changed listener from 'key' to 'change'
Fix Bug 1274067: No new drafts created after discarding page
- disabled autosave after discard button clicked
Fix Bug 1269851: Save draft should not wait for typing break to save
- added throttled call to autosave every 500ms
- reduced debounce autosave to 500ms, to catch edits made after throttle
Fix Bug 1301656: Remove draft feature from new page creation
- removed draft widget from new pages
- changed data format for new translation pages to retain drafts there

- autosave now enabled by default even with saved draft
-- removed need to discard saved draft
- separated draft functionality into a new file
- new utility function to get query strings by variable name
- added some analytics instrumentation
- standardized draft storage formats for non-English pages
-- migrated old draft formats to new storage format


6 months ago
Last Resolved: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.