angular / angular/components

Some Mat SVG Icons disappear on mat-sidenav close

Open
#16,467 11 comments 2 reactions 0 assignees View on GitHub
area: material/icon P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-7-master-svg1

Steps to reproduce:
1. Setup shared components for svg icon, sidebar content and page content alongside the ability to toggle mat-sidenav.
2. Toggle Sidenav and see all svg icons on the page get disappeared on sidenav close and re-appear on sidenav open.


#### Expected Behavior

No svg icon should disappear from the page.

#### Actual Behavior

Toggling Sidenav makes all svg icons on the page disappear on sidenav close and re-appear on sidenav open. Moreover, if you inspect the html output of page and components, you will see that svg icons are still present there, with no change in attributes, html, etc. Furthermore, this bug happens with some icons only (not sure what is the differentiator as there's dozens of icons in our locally under-development app that exhibit this weird bug, but there are also some that don't), for example, svg icon in this stackblitz works correctly. https://stackblitz.com/edit/angular-7-master-svg2

#### Environment

- Angular: 7.2.8
- CDK/Material: 7.3.3
- Browser(s): Google Chrome Version 75.0.3770.100 (Official Build) (64-bit) and Version 71.0.3578.80 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Cent OS and Windows 10

Contributor guide

Open the contributing guide

Research direction

Start with the two linked StackBlitz reproductions, angular-7-master-svg1 and angular-7-master-svg2, and compare the mat-sidenav toggle behavior with the SVG icons. Trace the mat-sidenav and Material SVG icon interaction, then verify that toggling the sidenav leaves every SVG icon visible, including the icons that currently disappear.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.