Problem/Motivation
There is a bug that the menu-item--active-trail if I add my home button into a menu. It looks like this:
<ul class="my-menu">
<li class="menu-item">
<a href="/drupal8/" data-drupal-link-system-path="<front>" class="is-active">Home</a>
</li>
<li class="menu-item">
<a href="/drupal8/node-17-article" data-drupal-link-system-path="node/17">Test 1</a>
</li>
</ul>
Other items have li.menu-item--active-trail class assigned.
<ul class="my-menu">
<li class="menu-item">
<a href="/drupal8/" data-drupal-link-system-path="<front>">Home</a>
</li>
<li class="menu-item menu-item--active-trail">
<a href="/drupal8/node-17-article" data-drupal-link-system-path="node/17" class="is-active">Test 1</a>
</li>
</ul>
Proposed resolution
Add the li.menu-item--active-trail class also to LI elements that contain Home links.
<ul class="my-menu">
<li class="menu-item menu-item--active-trail">
<a href="/drupal8/" data-drupal-link-system-path="<front>" class="is-active">Home</a>
</li>
</ul>
Remaining tasks
User interface changes
Home links show with proper background color set in CSS.
API changes
None.
Data model changes
None.
Comments
Comment #2
hass commentedComment #3
hass commentedComment #4
hass commentedComment #5
star-szrCan we check that it's not a menu thing first, please?
Comment #6
hass commentedSure. It more likely a menu bug.
Comment #7
mikeocana commentedill check this
Comment #9
toomanypets commentedComment #10
toomanypets commentedSee #1578832-35: [already commited but followup for CR?] <front> menu links are missing active trail classes for a work-around that almost works.
Comment #15
legolasboClosing this as a duplicate of #1578832: [already commited but followup for CR?] <front> menu links are missing active trail classes which has been around since 2012