Drupal.behaviors.activeLinks Fails to Add is-active Class to Menu Links in Views with Dynamic Query Parameters

Created on 29 May 2025, 2 days ago

The `core/misc/active-link.js` script in Drupal 10 assigns the `is-active` class to menu links based on an exact match of the `system path` and query parameters (`data-drupal-link-query`). In views with exposed filters, dynamic query parameters (e.g., `?filter=value`) prevent menu links from being marked active, as the parameters do not match `data-drupal-link-query`, resulting in an inconsistent user experience.

πŸ› Bug report
Status

Active

Version

10.4 ✨

Component

menu system

Created by

πŸ‡ͺπŸ‡ΈSpain Carlos Romero

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024