-
Notifications
You must be signed in to change notification settings - Fork 110
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
User Activity closes the Warning window #26
Comments
was going to look into maybe using this but if it reads activity on a mouse move, no way. a mouse could easily be bumped, etc. i would not assume that means the user is "active" for determining timing out or not. I agree with blerimj about the modal staying until the user make a decision or the timer expires. |
I am not sure how to do this the proper "GitHub" way, but on the bootstrap-session-timeout.js file, I wrapped the contents of the function starting on line #98
with
and remove the modal specific lines (originally 109-119 which would now prevent the user activity from resetting the session timer and closing the dialog. So it becomes...
Just my two cents. |
User activity closing the modal was intentionally added in 1.0.3 with commit 4b5b865. However, the readme file says:
Is there a reason why this behavior was changed? It is a strange user experience to see the modal pop up and then immediately disappear upon moving the mouse without being able to click on either button option. |
Here is the diff from 4b5b865 --> master This is what was removed if( $('#session-timeout-dialog').length > 0 &&
$('#session-timeout-dialog').data('bs.modal').isShown )
{
$('#session-timeout-dialog').remove(); this is what was added if ($('#session-timeout-dialog').length > 0 &&
$('#session-timeout-dialog').data('bs.modal') &&
$('#session-timeout-dialog').data('bs.modal').isShown) {
// http://stackoverflow.com/questions/11519660/twitter-bootstrap-modal-backdrop
$('#session-timeout-dialog').modal('hide');
$('body').removeClass('modal-open');
$('div.modal-backdrop').remove();
} I'll add a new parameter |
please take a look at https://github.com/powpow12/bootstrap-session-timeout/tree/features/action_hides_modal. A few things to clarify,
This is currently
I don't know if makes more sense to have the current logic be the default or the new "better" logic. I could go either way on it
The only way you can close the modal is via the close, logout, or keep me logged in buttons |
The flag is actually called ignoreUserActivity. So set that to false and the mouse moves don't close the dialog. Very nice little utility. |
With ignoreUserActivity the session dialogue pops up regardless of the user's activity which is a bit annoying for them .. It's a better UX to pop up with no user activity at the timeout. The way it's working currently makes the dialogue buttons redundant because the user can't click them in time. Or does ignoreUserActivity still reset the timeout? |
@blerimj use ignoreUserActivity:true property |
I agree with several comments. It seems counterintuitive to hide the modal once it appears on activity. Using the prop No complaints as this is a fantastic utility. I did something similar to @powpow12 example. |
How to reset the timer or keep alive if mouse and keyboard is in-use. And when idle and pop up, mouse move will not hide the modal? I tried the following but not working. Please help.
|
I have HideModalOnAction set to false but the modal still closes as soon as I move the mouse. |
Hello there,
I use the session timeout library with these settings:
$.sessionTimeout({
keepAlive: false,
logoutUrl: '/logout',
redirUrl: '/logout',
warnAfter: 300000,
redirAfter: 330000,
countdownMessage: 'Redirecting in {timer} seconds.'
});
The problem I experience is that after the warning is shown to the user, the modal is closed after mouse move. I expect the modal to stay open until the timer expires or the user click on one of two buttons: Stay Conntected or Logout.
Thanks, Blerim
The text was updated successfully, but these errors were encountered: