You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The strategy needs to measure the sizes of elements in order to block scrolling. ngOnInit is likely too early for that to happen reliably. You can try either moving it to a later hook or wrapping it in a requestAnimationFrame.
Description
I didn't find any description in the documentation, but when
Overlay
creation called inOnInit
,BlockScrollStrategy
is not blocking scroll.I noticed another behavior:
height: 101vh
applied asapp-root
styles, block is working fine (stackblitz)height: 101vh
is applied as.root
class with@HostBinding
call - block is not working (stackblitz)I think related: #19020, #22217
Reproduction
Everything works fine when called inside
AfterViewInit
: https://stackblitz.com/edit/stackblitz-starters-sp8ikj?file=src%2Fmain.tsEnvironment
The text was updated successfully, but these errors were encountered: