Problem/Motivation
When the timer runs out and the dialog opens up after the first time this happens, there will be multiple dialogs open.
Steps to reproduce
- Install and configure the module (lower the timeout time, to make it easy to test)
- Go to main page and wait
- The first time the dialog opens click the button to stay logged in
- When the dialog opens for the second or the nth time, there will be multiple dialogs. Spamming the stay logged in button will still correctly reset the timer
Proposed resolution
Check if there is an open dialog in the background and close it before creating a new one. Honestly, this whole JS file will need to be refactored sometime in the future, over the years fixes were added and much of the code is outdated with modern JS.
Issue fork autologout-3390069
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3390069-multiple-dialogs-open
changes, plain diff MR !43
Comments
Comment #3
admirlju commentedComment #4
admirlju commentedComment #5
admirlju commentedSo it looks like the proposed solution does fix the problem. But as I said, this whole JS file is a mess and should be refactored in the future. Issue ready for review.
Comment #6
deaom commentedThis needs to be re-visited once #3339695: Use Drupal.dialog call instead of jQuery dialog is committed, as there were some changed added that should solve the issue already, so for now postponing it.
Comment #7
joseph.olstadI've developped and tested a simple solution for this bug.
Comment #9
joseph.olstadThis is a 2.x issue also
Comment #10
joseph.olstadI will make a new issue, the branch / d.o gitlab is confused and can't pick up 2.x, because the issue was logged prior to 2.x existing.
Comment #11
joseph.olstad#3469258: Multiple dialogs open / have to click multiple times