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

Command icon 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:

Comments

admirlju created an issue. See original summary.

admirlju’s picture

Status: Active » Needs work
admirlju’s picture

Issue summary: View changes
admirlju’s picture

Status: Needs work » Needs review

So 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.

deaom’s picture

Status: Needs review » Postponed

This 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.

joseph.olstad’s picture

Assigned: Unassigned » joseph.olstad
Status: Postponed » Active

I've developped and tested a simple solution for this bug.

joseph.olstad changed the visibility of the branch 3390069-multiple-dialogs-open to hidden.

joseph.olstad’s picture

Version: 8.x-1.x-dev » 2.x-dev

This is a 2.x issue also

joseph.olstad’s picture

Status: Active » Closed (outdated)

I 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.