Skip to content

Chips prevent anchor link navigatation #9032

Closed
@varadero

Description

@varadero

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Anchor links inside (or wrapping) chips should navigate to their href

What is the current behavior?

Placing <a> inside <mat-chip> or placing <mat-chip> inside <a> causes no navigation to the <a>'s href.

What are the steps to reproduce?

  1. Click the button "Edit in StackBlitz" in mat-chips page at https://material.angular.io/components/chips/overview and add these two lines:
    <a href="https://google.com"><mat-chip>Does not work as parent</mat-chip></a>
    <mat-chip><a href="https://google.com">Does not work as child</a></mat-chip>
  2. Click on "Does not work as ..." links

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

Chips that are capable to navigate to another page without the need of javascript code

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

Angular: 5.1.1
Material: 5.0.1 (does not work with 5.0.0-rc.3 also which was initially loaded by StackBlitz)
OS: Windows 7
TypeScript: The version that StackBlitz uses

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaround

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions