Problem/Motivation

The Drupal.behaviors.moduleFilterModulesTabs behaviour should only be ran once, otherwise anytime there's a new ajax request on the page e.g. if the Automated Logout module is enabled and doing its check, the behaviour is ran indefinitely.

Resulting in nested tabs:

Nested tabs

Steps to reproduce

Enable the Automated Logout module and wait for an ajax request to be called.

Proposed resolution

Apply the appropriate behaviours once on the parent page.

The context variable should also be used during jQuery calls to ensure that the code works with AJAX requests.

Remaining tasks

Update javascript behaviours to support AJAX requests.

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

codebymikey created an issue. See original summary.

teodyseguin’s picture

Assigned: Unassigned » teodyseguin
teodyseguin’s picture

Assigned: teodyseguin » Unassigned
Status: Active » Needs review
StatusFileSize
new870 bytes

I have made a patch here.

teodyseguin’s picture

smustgrave made their first commit to this issue’s fork.

  • smustgrave committed 6e435f75 on 8.x-3.x
    Issue #3186276: Javascript behaviour should only be ran once (results in...
smustgrave’s picture

Status: Needs review » Fixed

Thanks for the fix!

smustgrave’s picture

Status: Fixed » Needs work

Reverting changes as they seemed to break on D10

smustgrave’s picture

Version: 8.x-3.x-dev » 4.x-dev
smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)

Wonder if this can be retested on 4.x? Not seeing the issue anymore?

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
teodyseguin’s picture