-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Restoring form-data on editor panel #553
Comments
I think I know the answer to this - it's quite simple... if I'm right - browser preserve content in side a |
I think it also may have to do with our caching settings... update: adding |
This is another thing that I would love for someone to investigate and let me know what they think is causing it. Does this always happen for CodeMirror? Is there a way around it? Perhaps we could implement a solution with localstorage? |
Immediate thought from me is to hack it up with localstorage. But it would cause other issues if -for example- you were editing something that has changed since you left the tab. Maybe it would work if you just set a 30 second timeout on it. I think by then you'd notice if you've accidentally gone somewhere |
@gotdibbs, any conclusions you can draw about this would be much appreciated. |
Upon further investigation it appears that showdown works fine by itself, its actually codemirror that seems to be the culprit. My assumption is that since codemirror is hiding the textarea (setting A couple of things for reference:
|
Gonna punt this to 0.4 for now. |
@ErisDS Please consider implementing a simpler solution in I just lost a 2 hour-in-the-making blog post (for the 2nd time) because of this, making me completely unwilling to use the built in editor until something is in place. |
For everyone bumping into this - the shortest term solution is ensuring you use the save button at regular intervals, the keyboard shortcut However, we are aware that this is a common problem. There are a number of things that can be done to mitigate it. Including warning messages when leaving with unsaved changes, working to ensure we aren't overriding the browser feature which recalls the data (this works wonderfully on GitHub), as well as autosave. PRs are very welcome for these issues. |
We now have an alert message for anyone who attempts to leave without saving, which is potentially even more useful than this. Paired with #1413 (auto save) we should be fine, so closing this. |
Did you ever type out a big long post in the Ghost editor, accidentally hit a link, back button or close the tab, and then get it back to find you've lost everything?
Did you ever type out a big long comment/issue on Github, accidentally hit a link, back button or close the tab, and then get it back to find your comment/issue still waiting to be submitted?
I believe that this is a browser behaviour which depends on certain things. Something about the way that CodeMirror works doesn't work with the behaviour. That or there is some fancy thing on github that we should emulate.
At the very least, I'd like someone to investigate why Ghost's editor doesn't exhibit this behaviour, and Github does, and what the requirements are for fixing it.
The text was updated successfully, but these errors were encountered: