๐ Bug report Form refresh / away click
Closed this issue ยท 1 comments
A user filling out a form can redirect or refresh the page without a warning that it will lead to all inputs being cleared.
Expected Behavior
When a user is filling out a form, he should get a warning if he tries to go away or refresh the page, telling him that he will lose all filled in information if he does.
Current Behavior
The user does not get a warning or the option to stay when attempting to redirect or refresh
Possible Solution
A dialog window that tells the user that he will lose all inputed information if he continues
Steps to Reproduce
- Start to fill out a DEP message
- Refresh or click on profile/dashboard etc
- User should get warning, does not
- Information lost
Context (Environment)
Fat / cold fingers on users clicking on things they shouldnt.
Detailed Description
Possible Implementation
Have a check if the user is trying to leave the page.
https://stackoverflow.com/questions/32841757/detecting-user-leaving-page-with-react-router
PR #58 fixed this issue, in a way. There are no rouge redirects anymore, and the user should not worry about going away from a form anyway. The data should still be preserved. This was never a problem, only the redirects (explained in the PR) caused trouble.
Closing ๐