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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal-2963523-nolink-and-none-links-will-not-receive-is-active-2.patch | 1021 bytes | eyal shalev |
Comments
Comment #2
eyal shalevadded a patch file that excludes and links from getting the is-active class.
Comment #3
idebr commentedHi 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.
Comment #4
eyal shalevHi 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.