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

display warning when user navigates back in web browser #96

Open
JAvRZ opened this issue Jul 4, 2016 · 8 comments
Open

display warning when user navigates back in web browser #96

JAvRZ opened this issue Jul 4, 2016 · 8 comments
Assignees

Comments

@JAvRZ
Copy link
Contributor

JAvRZ commented Jul 4, 2016

All fields are still active, but changing the values in some fields (age, test scores) do not seem to affect the visualisations or the tables. It seems like the ocpu/normcomp part isn't run the second time, because other things, unrelated to normcomp like the names of the participant, can be changed and will show up differently the second time one goes to the visualisation.

@mkuzak
Copy link
Member

mkuzak commented Jul 6, 2016

Currently there is no previous from the visualization. Should there be one?

@JAvRZ
Copy link
Contributor Author

JAvRZ commented Jul 11, 2016

If there is no previous button, I think it is inevitable that people are going to try the back button in the browser (because of iterative analyses, discovered typos in test scores, interest in other patients). So if there is no Previous button, I think people wouldn't mind too much because they can use the Backbutton, but I'm worried of unexpected behaviors when they do.

@mkuzak
Copy link
Member

mkuzak commented Jul 11, 2016

What we need is to define exactly the behaviour of going back and forth, what is being kept, what is being refreshed etc.

@JAvRZ
Copy link
Contributor Author

JAvRZ commented Jul 11, 2016

I think people like that things are kept, so that you can look at a extremely aberrant test result, think, hold on, that's not right, go back, see that you typed in 66 instead of 6, remove one 6, and go back to the results. If everything is refreshed once more, you can only retry from a blank slate (and have to look up the 6 from scratch). I btw find myself pressing the previous button in the table under the plots (that's a different "Previous", I know, but my reptile brain does not).

@mkuzak
Copy link
Member

mkuzak commented Aug 30, 2016

As discussed recently, we will alert users when they usenext and back/prvious in the browser and in the page. They should not expect any data to be kept in place.
For listening on browser navigation:

window.onbeforeunload = function() {
    return "Leaving this page will reset the wizard";
};

after this stack overflow thread

@mkuzak mkuzak changed the title When clicking browser back-button from the visualisation, some fields have no effect display warning when user navigates back in web browser Sep 22, 2016
@mkuzak mkuzak added the feature label Sep 22, 2016
@mkuzak
Copy link
Member

mkuzak commented Dec 19, 2016

the solution with "onbeforeunload" does not work, according to docs it can be ignored by the browser

@jvdzwaan
Copy link

I came across this solution using angular: http://stackoverflow.com/questions/15813850/how-to-detect-browser-back-button-click-event-using-angular

However, not sure this always works (and how to check whether it does)

@mkuzak
Copy link
Member

mkuzak commented Dec 19, 2016

I'll give it a shot.

@mkuzak mkuzak added the wontfix label Dec 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants