fix(common): viewport scroller not finding elements inside the shadow DOM by crisbeto · Pull Request #41644 · angular/angular

@crisbeto added action: review

The PR is still awaiting reviews from at least one requested reviewer

area: common

Issues related to APIs in the @angular/common package

target: patch

This PR is targeted for the next patch release

labels

Apr 15, 2021

@crisbeto

… DOM

The `ViewportScroller` figures out which element to scroll into view using `document.getElementById`. The problem is that it won't find elements inside the shadow DOM.

These changes add some extra logic that goes through all the shadow roots to look for the element.

Fixes angular#41470.

AndrewKushnir pushed a commit that referenced this pull request

Apr 15, 2021
… DOM (#41644)

The `ViewportScroller` figures out which element to scroll into view using `document.getElementById`. The problem is that it won't find elements inside the shadow DOM.

These changes add some extra logic that goes through all the shadow roots to look for the element.

Fixes #41470.

PR Close #41644

AndrewKushnir pushed a commit that referenced this pull request

Apr 15, 2021
… DOM (#41644)

The `ViewportScroller` figures out which element to scroll into view using `document.getElementById`. The problem is that it won't find elements inside the shadow DOM.

These changes add some extra logic that goes through all the shadow roots to look for the element.

Fixes #41470.

PR Close #41644