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

Do you want to leave this site? #86

Open
phoebebright opened this issue Dec 9, 2016 · 5 comments
Open

Do you want to leave this site? #86

phoebebright opened this issue Dec 9, 2016 · 5 comments

Comments

@phoebebright
Copy link

Have installed session security as per instructions with default values. In my system many of may page changes are via javascript with document.location.href = next;

Have tried both "http://domain/etc/123" and "/etc/123" and both trigger the "Do you want to leave this site" dialog.

The pages have little forms, like a search box and I tried removing them but this had no effect.

Reverted to version before adding session security and dialog stopped coming up.

Do you have any suggestions off what is triggering the dialog?

@jpic
Copy link
Member

jpic commented Dec 9, 2016

It would be great if you could create a demo project because I have no idea :)

@phoebebright
Copy link
Author

It's a monster project so trying to cut it down will take some time. Will try a few different things and see if I can narrow it down.

@jpic
Copy link
Member

jpic commented Dec 9, 2016 via email

@jarommadsen
Copy link

I've reproduced this as well. In our case it comes from pages with django forms. In some cases this is fine but on pages where those forms are filters for tables it becomes pretty annoying. There is actually already functionality built in for fixing this though it's pretty well hidden in the documentation on page 17 using this option:

{% include 'session_security/all.html' %}
<script>
sessionSecurity.confirmFormDiscard = undefined;
</script>

@jpic
Copy link
Member

jpic commented Apr 4, 2017

Could you suggest a better way to document it in a PR ?

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

3 participants