Problem

links receive the is-active class in the front page.
This is happens because the LinkGenerator class treats both and as a links to the front page (it checks their system-path which coresponds to an empty string).

Proposed resolution

Add an exception for both and routes before adding the data-drupal-link-system-path property.

User interface changes

Links for the and routes will no longer receive the is-active class in the front-page.

Comments

Eyal Shalev created an issue. See original summary.

eyal shalev’s picture

Status: Needs work » Needs review
StatusFileSize
new1021 bytes

added a patch file that excludes and links from getting the is-active class.

idebr’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2838351: Links with no path get active class on front page

Hi Eyal,

This issue was reported earlier at #2838351: Links with no path get active class on front page. Can you have a look at the related issue and see if the patch fixes your problem as well?

I'll close this issue as a duplicate, so we can focus our efforts in the related issue.

eyal shalev’s picture

Hi Ide,

Sorry for the duplicate - didn't come up when I searched for it.

I think that the patch will work (seems very similar to mine), anyway I'll comment there if there is any issue.