Skip to content

fix(icon): reverse for loop when removing child nodes from mat-icon #12073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 45 commits into from
Closed
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b959e18
fix(button-toggle): use native button and aria-pressed for button-tog…
tinayuangao Jun 20, 2018
d083d76
fix(table): use solid color for sorting arrow (#11533)
crisbeto Jun 20, 2018
6c9c3fe
fix(select): don't blur label when trigger is blurred while the panel…
crisbeto Jun 20, 2018
671ad82
fix(menu): panel positions not changing if position is updated after …
crisbeto Jun 20, 2018
11f3993
fix(progress-spinner): create internal default to force animations to…
josephperrott Jun 21, 2018
828b3c0
fix(button-toggle): emit change event when button is clicked (#11886)
tinayuangao Jun 22, 2018
3e99c46
fix(overlay): explicitly implement OverlayReference. (#11824)
mprobst Jun 26, 2018
194b3c7
Update MatFormField outline DOM structure (#11771)
glouischandra Jun 26, 2018
548266b
fix(menu): scrollable menu not scrolled to top when opened for the fi…
crisbeto Jun 26, 2018
cd32d78
fix(select): reset option being marked as selected (#11934)
crisbeto Jun 26, 2018
ab14539
fix(list-key-manager): allow withWrap to be disabled (#11920)
crisbeto Jun 26, 2018
31c8f6b
fix(aria-describer): clear duplicate container coming in from the ser…
crisbeto Jun 26, 2018
df80dc6
fix(button): not resetting all outlines on firefox (#11911)
crisbeto Jun 26, 2018
8a9a8bc
fix(card): don't override vertical divider styles (#11899)
crisbeto Jun 26, 2018
8d6a9ae
fix(chips): ripples still showing up when globally disabled (#11918)
devversion Jun 26, 2018
8e44f89
fix(tabs): unable to set aria-label or aria-labelledby on tab (#11898)
crisbeto Jun 26, 2018
c55c0e1
fix(overlay): clear timeout if the backdrop transition completes earl…
crisbeto Jun 26, 2018
3acd2a4
feat(moment-dateadapter): add option to create utc dates (#11336)
Silthus Jun 27, 2018
5aac678
docs(ripple): add note about NoopAnimationsModule (#11909)
devversion Jun 27, 2018
ee9ddfb
fix(autocomplete): don't override native autocomplete attribute (#11926)
crisbeto Jun 27, 2018
42dd824
fix(schematics): add parse5 dep (#11647)
amcdnl Jun 28, 2018
e69cf76
fix(slide-toggle): not updating model from toggle method (#11846)
crisbeto Jun 28, 2018
96b389c
fix(icon): clearing all content when inserting a new SVG (#11956)
crisbeto Jun 28, 2018
79415c4
fix(button-toggle): allow event bubbling for toggle button clicks (#1…
josephperrott Jun 28, 2018
0244afc
fix(checkbox): fix checkbox animation when moved between view contain…
tinayuangao Jun 28, 2018
47741ab
Fix schematics collection JSON. (#11839)
piotrtomiak Jun 29, 2018
c36e6f3
fix: default config check is not checking test builder (#11816)
mjawulski Jun 29, 2018
0e5b30e
fix(schematics): error in generated unit test (#11884)
crisbeto Jun 29, 2018
11d7080
fix(select): support ctrl+a shortcut for multi-select (#11799)
crisbeto Jun 29, 2018
6b1f703
fix(GlobalPositionStrategy): justifyContent center ignored when direc…
leibale Jun 29, 2018
de13ec9
fix(sort): arrow visible while parent row is being animated (#11827)
crisbeto Jun 29, 2018
2433439
fix(overlay): don't dispatch key events to overlays that don't handle…
crisbeto Jun 29, 2018
4f3cbfe
fix(tab-nav-bar): ripples still showing up when globally disabled (#1…
devversion Jun 29, 2018
a3dba76
fix(select): not resuming keyboard selection after clicking on single…
crisbeto Jun 29, 2018
4ac64da
fix(selection-list): disabling list doesn't disable ripples of option…
devversion Jun 29, 2018
8f3b316
fix(focus-monitor): allow native focus options to be passed through f…
crisbeto Jun 29, 2018
a7c4d0c
fix(autocomplete): reposition the panel when the amount of options ch…
crisbeto Jun 29, 2018
ce90bed
fix: parse5 not listed as dependency for material (#11981)
devversion Jun 29, 2018
1e164b6
fix(tabs): maintain selected tab when new tabs are added or removed (…
crisbeto Jun 29, 2018
80d9a9a
fix(focus-trap): not attaching correctly if element is not in the DOM…
crisbeto Jun 29, 2018
82016c2
fix(sidenav): remove margin from content instead of setting zero (#11…
jelbourn Jun 29, 2018
c4c4d5b
chore: update changelog for 6.3.2 (#12019)
josephperrott Jul 2, 2018
ce76a62
reverse for loop when removing child nodes
pavel-agarkov Jul 5, 2018
0f82c5e
optimizing reverse loop
pavel-agarkov Jul 5, 2018
08294bc
Merge branch 'master' into patch-1
pavel-agarkov Jul 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/icon/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ export class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, Can

// Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that
// we can't use innerHTML, because IE will throw if the element has a data binding.
for (let i = 0; i < childCount; i++) {
const child = layoutElement.childNodes[i];
while (childCount--) { // reverse loop
const child = layoutElement.childNodes[childCount];

// 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid
// of any loose text nodes, as well as any SVG elements in order to remove any old icons.
Expand Down