assemblymade/coderwall — pull request #145 by Mileshosky (2014-07-31 18:11:27+00:00)
Title: Autosave all the protips - clientside of course. [WIP 146]

Work for WIP #146 - https://assembly.com/coderwall/wips/146

Current behavior:
* Once a user starts typing, we save the Protip text area content every 3 seconds. Delay can be configured if we want.
* If content has been saved, and a user navigates away from the page (or has a browser crash, etc) - when they come back to the new Protip form, their autosaved content will be populated in the text area from localStorage.
* When a user submits the form successfully, the autosaved text area content is cleared. The next request to the new Protip form will not populate the text area with any localStorage content.
* When a user submits the form unsuccessfully (validation errors) the form will maintain it's field content from the form submission and store the prefilled text area content into localStorage.