Due a recent change in menu.html.twig (removal of the anti-pattern loop) the is_parent variable was always true.

This resolves the bug where non-parent items are assigned the is-parent class and therefor the responsive main menu items have click toggles.

Comments

Jeff Burnz created an issue. See original summary.

Jeff Burnz’s picture

Issue summary: View changes
Status: Active » Needs review

This should actually give us what we need, since is-parent should never really needed (or added) unless this is true:

{% set is_parent = false %}
{% if item.below and item.is_expanded %}
  {% set is_parent = true %}
{% endif %}

  • Jeff Burnz committed 92a2187 on 8.x-1.x
    Issue #2835983: Menu items always assigned is-parent class, even when...
Jeff Burnz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Jeff Burnz’s picture

Status: Closed (fixed) » Active

Roll back on 1.x, needs to be reapplied to 1.x for 8.x-1.0-rc3

Should include removing the anti patten and applying the fixes here as well.

Jeff Burnz’s picture

Status: Active » Fixed

Should be fixed now.

Status: Fixed » Closed (fixed)

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