Closed
Bug 773672
Opened 11 years ago
Closed 11 years ago
When leaving a page and coming back, restore previous content rather than warning the user before leaving
Categories
(developer.mozilla.org Graveyard :: Editing, defect, P2)
developer.mozilla.org Graveyard
Editing
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: callahad, Assigned: davidwalsh)
References
Details
(Whiteboard: s=2012-08-22 p=2 s=2012-08-29)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/16.0 Firefox/16.0 Build ID: 20120706075126 Steps to reproduce: Sometimes I accidentally trigger the Back function in my browser when editing a document on MDN. I then quickly go Forward to get back to editing. Actual results: All of my in-progress changes were gone. Expected results: A prompt to restore my in-progress changes, like with MindTouch, would be very, very nice.
Comment 1•11 years ago
|
||
Raymond: Can you confirm on developer-new? Can you confirm on multiple browsers -- I think some preserve form contents in these circumstances.
Updated•11 years ago
|
Priority: -- → P2
Updated•11 years ago
|
Whiteboard: s=2012-08-22
Updated•11 years ago
|
Summary: In-progress edits not restored when navigating back then forward → When leaving a page and coming back, restore previous content rather than warning the user before leaving
Whiteboard: s=2012-08-22 → s=2012-08-22 p=2
Assignee | ||
Comment 4•11 years ago
|
||
There's some code in place for this, going to continue it now. Quick FYI -- we'll likely need to experiment with this. *Storage interactions are synchronous, so we'll have to be careful not to sow the user down too much while writing and saving at the same time.
Updated•11 years ago
|
Whiteboard: s=2012-08-22 p=2 → s=2012-08-22 p=2 s=2012-08-29
Comment 5•11 years ago
|
||
From notes I took from TXJS: * localStorage may slow down portions of your site, but the parts you are most worried about may not be a problem at all. * Benchmark your JavaScript with [jsPerf](http://jsperf.com/). * Best practices * Use window.onunload to store values after the user leaves. * Do not block the UI. Defer using localStorage until unload. * Do not save text entry in localStorage after every keystroke. Wait some length of time before saving.
Assignee | ||
Comment 6•11 years ago
|
||
I'm skeptical about onunload but we'll give it a shot
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dwalsh
Comment 7•11 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/bbb83cbb3a818da3ab2fbf453c3142773488b1a0 fix bug 773672 - Allow restoring of drafts when user leaves page https://github.com/mozilla/kuma/commit/0a03c9b596ad5320981d84663fa7b6c02d7d756b Merge pull request #547 from darkwing/localstorage-content-773672 fix bug 773672 - Allow restoring of drafts when user leaves page
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 8•11 years ago
|
||
verified fixed https://developer.allizom.org/en-US/docs/HTML
Status: RESOLVED → VERIFIED
Comment 9•11 years ago
|
||
This is fantastic. Really, really wonderful UX.
Updated•11 years ago
|
Version: Kuma → unspecified
Updated•11 years ago
|
Component: Docs Platform → Editing
Updated•3 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•