Skip to content

mat-menu trigger button is highlighted after closing menu #9292

@LosD

Description

@LosD

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Trigger button acts like other buttons: When action has completed, button returns to the neutral state.
image

... Actual keyboard focus stays, but the styling is back to neutral, when using the mouse to click (for keyboard navigation it stays lit... Which makes sense).

What is the current behavior?

Trigger button stay focused, and keeps the focused style.
image

What are the steps to reproduce?

  • Open https://stackblitz.com/edit/angular-material2-issue-tscawk
  • Click basic button.
  • Observe state of button after animation finishes.
  • Attach a menu trigger to a button.
  • Click button that is a mat-menu trigger.
  • Close menu using backdrop or buttons
  • Observe state of button, comparing with basic button.

What is the use-case or motivation for changing an existing behavior?

Consistency. Other buttons does not keep the focus styling, menu triggers shouldn't either.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Seen on:
Angular 5.0.0, 5.1.3
Material 5.0.2, 5.0.3
Linux, Windows
TypeScript 2.5.3 + whatever TypeScript is running on StackBlitz
Internet Explorer 11, Chrome 63.0.3239.84, FireFox 57.0.3, EdgeHTML 16.16299

Is there anything else we should know?

May be related to fix in #8348 (don't really think so, though, I think I've seen this behavior for a long time. It used to have the same problem when expanding sidebars using a button)

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions