micromasters
micromasters copied to clipboard
When user presses ESC on a profile dialog, they lose the work for that dialog
Ideas:
- display confirmation if user presses ESC and there is modified data
- preserve dialog data so user can get back to it (at least if editing)
Here is I think what we should do here:
- If the user has not entered anything in the form, and hits ESC, just close the dialog.
- If the user is in a field typing (ie. if the field is in focus) hitting ESC does nothing.
- If the user has entered any info in the form, and no field is in focus, hitting ESC will prompt a confirmation dialog. ("Are you sure? Closing this form will lose the information you entered.")
If the above takes too much effort, we can probably just do #2. I feel that use case #3 is an edge case, but I may be wrong.
@roberthouse54 A couple of comments, not necessary proposing a solution:
- Not sure your 2 and 3 are different. It seems like the problem we are trying to solve is "user hits ESC by mistake". whether the user is in the field typing or not, it's not that different.
- It seems like ESC is equivalent to clicking "Cancel" button. Se we should implement the same behavior for both events
I actually mainly copied what Github did... my sense is that this is an edge case, but I am trying to do what is expected. I think most normal users do not hit ESC when in a form. That is sort of power user/programmer behavior.
So, let's just do what I proposed in the comment above. I feel that most users will not his escape on purpose, and if they hit it by mistake they should not lose the info they have entered. So in other words, the user should have to hit save or cancel to close the dialog.