MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

MatNavMenu highlighting is no longer working

Open TehNolz opened this issue 5 years ago • 1 comments

Describe the bug Normally, MatNavItems should be highlighted when hovering over them with the mouse. This no longer happens. Only items that contain a MatNavSubMenu get highlighted.

The same issue can be seen on the documentation website, which rules out any potential issues my project might have. I'm currently running on version 2.7.0.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Blazor project, toss a MatNavMenu in it and populate it with a bunch of items. You can use the examples from the documentation as well.
  2. Run it and open the page in your browser.
  3. Hover over any of the items in the list. They will not be highlighted, except for those that contain a MatNavSubMenu.

Expected behavior Every MatNavItem is supposed to get highlighted when the mouse hovers over them. This effect can be seen on the old 2.6.0 documentation site.

Screenshots You can see this issue on the documentation website, which currently runs version 2.8.0-develop-022.

Additional context Based on the version numbers listed on the documentation websites and the version of MatBlazor my project is running, this bug was introduced in either 2.6.1, 2.6.2, or 2.6.3, or 2.7.0.

TehNolz avatar Nov 05 '20 14:11 TehNolz

@TehNolz I noticed this as well. I believe it was changes the Material Design CSS. It appears if the menu Item had a parent that it maintained its highlighting as that code is in MatBlazor. I will create a PR

In BlazorBoilerplate I have some custom CSS there to make it work: https://blazorboilerplate.com/todo_list

.mdc-list-item--selected::before { background-color: var(--mdc-theme-primary, #6200ee); opacity: 0.1; }

enkodellc avatar Mar 26 '21 18:03 enkodellc