Lang
Lang

Reputation: 983

How can I remove the select box from angular mat-menu?

I am using angular 6.1.3, and angular/material 6.4.5 (all in latest version) But when I run the following code, it always has a blue select box.

I tried this on both chrome and IE, and both has the same problem.

Is there any way to remove the blue box?

Thanks!

<mat-menu #usermenu [overlapTrigger]="false">
        <button mat-menu-item>
                <mat-icon>face</mat-icon>
                <label>Profile</label>
            </button>

            <button mat-menu-item>
                <mat-icon>exit_to_app</mat-icon>
                <label>Logout</label>
            </button>
</mat-menu>

enter image description here

Upvotes: 9

Views: 4975

Answers (1)

Lang
Lang

Reputation: 983

I solved this problem by @SuperDJ's comment,

Added css "outline: none" to my button

Hope this may help who has the same problem with me.

Upvotes: 15

Related Questions