Skip to content
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

Pressing the Esc key while editing a rich text field loses changes #2998

Closed
aaugustin opened this issue Sep 14, 2016 · 2 comments
Closed

Pressing the Esc key while editing a rich text field loses changes #2998

aaugustin opened this issue Sep 14, 2016 · 2 comments

Comments

@aaugustin
Copy link
Contributor

aaugustin commented Sep 14, 2016

Issue Summary

A user reports that changes disappear mysteriously while she edits a page.

While poking around, I noticed that pressing the Esc key while editing a rich text field causes the field to lose focus and also revert changes. I suspect that's what causes the issue.

Steps to Reproduce

  1. Click in a rich text field in the wagtail edition interface
  2. Make changes
  3. Press Esc

Since the user may have put significant effort into making changes, it's a bit cavalier to destroy changes without warning on a single keypress.

Wagtail warns when navigating out of an edit page without saving, showing that it attempts to prevent such data loss.

The scenario I'm describing here is more problematic because there's no way to recover the data. You can't go back once you hit Esc.

I'm not sure what the best behavior is but I'm pretty sure that silently dropping changes isn't optimal.

Technical details

  • Python version: 3.5
  • Django version: 1.10
  • Wagtail version: 1.6.2
  • Browser version: latest Chrome (I couldn't find where Chrome shows its version)
@gasman gasman closed this as completed in c6666c6 Sep 16, 2016
@gasman
Copy link
Collaborator

gasman commented Sep 16, 2016

Thanks for the report! I wasn't aware that hallo.js had this 'feature', and I agree it's more likely to be harmful than helpful... removed in c6666c6.

@aaugustin
Copy link
Contributor Author

Thanks a lot for the quick patch!

FYI I also reported the issue upstream to hallo.js: bergie/hallo#245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants