You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(material/menu): clicks on disabled item closing the menu
We have some logic to prevent clicks on disabled items from closing the menu. The
problem is that browsers swallow clicks and don't fire their event listeners for disabled
`button` nodes, but not any non-disabled child nodes. In #16696 we made it
consistent so clicks don't land on any of the button's elements, but these changes
fix the underlying issue by binding the event both on the root `button`, and a wrapper
`span` that's around the content. This way we're guaranteed to hit at least one of the listeners.
These changes also move the event outside the `NgZone` since it doesn't trigger any
changes in the view.
Fixes#19173.
0 commit comments