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 escape key empties the assessor feedback box #17

Open
jaygooby opened this issue Jul 12, 2020 · 2 comments
Open

Pressing escape key empties the assessor feedback box #17

jaygooby opened this issue Jul 12, 2020 · 2 comments

Comments

@jaygooby
Copy link

If you press the escape key at any point when writing feedback for a question, the feedback box is emptied, and then saved and there's no way to retrieve what you've just written.

This is incredibly frustrating, especially if you've just written a couple of paragraphs of feedback! Could you please trap escape key presses so they don't empty the text box or at least offer a way to retrieve a previously saved response.

escape-key

@jaygooby
Copy link
Author

Arg! This just happened again. My normal workflow for assessments is to run Karabiner elements and use the profile where I've disabled the escape key. I forgot to do this and lost another couple of paragraphs of text.

I've built a minimum proof of concept of the problem. If you press escape in the div after typing, you'll lose your text:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<script src="./jquery.htmlClean.min.js"></script>
<script src="./rangy-core.js"></script>
<script src="./rangy-selectionsaverestore.js"></script>
<script src="./jquery.htmlClean.min.js"></script>
<script src="./html-md.js"></script>
<script src="./showdown.js"></script>
<script src="./hallo.js"></script>

<div id=editor style="border: solid 1px #000"></p>

<script>
jQuery('#editor').hallo({
  toolbar:'halloToolbarFixed'
});
</script>

Aside from the two jquery libraries, all the other .js came from https://github.com/InnovateUKGitHub/innovation-funding-service/tree/6f93dad035fb407fb3d056219c724d1778a3f357/ifs-web-service/ifs-web-core/src/main/resources/static/js/vendor/wysiwyg-editor.

It's a known problem with hallo.js and has been reported to the project, but that hasn't had any activity in 3 years.

It looks like this issue would affect applicants as well as assessors, because presumably they both use the same rich text editor.

@jaygooby
Copy link
Author

This is still an issue 😞

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

1 participant