-
Notifications
You must be signed in to change notification settings - Fork 6
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
isDirty should be cleared when settings are saved #71
Comments
Perhaps this was tested before the inclusion of changes.js? This line forces |
Also
|
Probably the same issue, from http://commons.gc.cuny.edu/?p=44277:
|
A clue: During a recent edit, I got a note about a more recent autosave, and when I clicked through to look at it, I saw that the difference between the autosave and the latest revision was coming from
@christianwach I don't 100% understand how FEE intends to be handling |
It's a FEE problem. See my comment here: I fixed the wpautop() autosave issue by reversing wpautop at the server level (commit e036fd2). I didn't do this for wptexturize() or convert_chars(). FEE relies on these filters otherwise the content looks messed up in the editor. However, these filters mess up autosave and revisions... |
8cdeb7f takes @christianwach's fix from 807f402 and replicates it for the comment moderation links, which seem to be the place where the team was noticing the issue the most. There's still a ton of inconsistency here, and it would be nice to come up with a better system. Instead of doing content comparison, as FEE currently does, it would be less problematic to have a simple flag that gets tripped by element changes:
This would generate more false positives (when A changes to B and then back to A), and it would be subject to certain race conditions. But it would be much less finicky than what's currently in FEE. That said, I don't know how to do it without hacking FEE. Ideally, |
Instead of comparing content, we set an `isDirty` flag whenever a change is detected. The flag gets set back to `false` on `fee-after-save`. This technique can result in some false positives, as when you change content but then undo that change. But it has a couple of benefits that outweigh this downside: * It warns the user about unsaved changes on the Settings panel, which FEE doesn't know about. * It allows us to modify the content of the editor at will, without worrying about FEE's `isDirty` checks. See #77, #71, #42.
From https://commons.gc.cuny.edu/wp-login.php?action=bpnoaccess&auth=1&redirect_to=http%3A%2F%2Fcommons.gc.cuny.edu%2F%3Fp%3D44222
I have experienced something along these lines in the past. It's possible that it's resolved with recent changes to isdirty logic.
The text was updated successfully, but these errors were encountered: