Problem/Motivation

When accessing the Entitree admin page to browse the locations, you can't expand the menu for each location. This prevents adding or editing the locations. This only started happening after updating the Gin Admin Toolbar to RC1 (from beta 22).

Not sure why this is happening now (there's nothing obvious in the Gin Toolbar source).

Steps to reproduce

Nothing special, just navigate to the Entitree Locations browser and click the downward arrow on Entitree Site Root.

Proposed resolution

It looks like this is a problem with the entitree.js file's Drupal.behaviors implementation. Limiting the context seems to help so maybe this needs to use once() or something similar.

When inspecting the DOM and adding some logs to the JS, it looks like the click events are just running too many times.

Issue fork entitree-3343761

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

inversed created an issue. See original summary.

inversed’s picture

Status: Active » Needs review

The fix for this was to call the event instantiation with Drupal's once() and update the JS and libraries.yml to support this.

  • inversed committed 993d779f on 1.0.x
    Issue #3343761: Make locations menu JS events use once()
inversed’s picture

Status: Needs review » Fixed

Fixed and closing this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.