Fix: Added scroll strategy for overlay
Description
Added scrollStrategy to overlay to reposition the overlay while scrolling. This makes the overlay stick to the position on the page and scrolls along with the rest of the page.
This would only work if the cdk-scrollable directive is used on the container that is being scrolled through.
So, its not a universal solution, but cdk-scrollable needs to be added to any containers that have overlays that are facing this issue.
For reference, this is where I found the solution.
https://github.com/angular/components/issues/6157#issuecomment-318972884
https://github.com/angular/components/issues/6157
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
7080b66) 81.71% compared to head (33287f7) 81.71%.
Additional details and impacted files
@@ Coverage Diff @@
## main #2601 +/- ##
=======================================
Coverage 81.71% 81.71%
=======================================
Files 928 928
Lines 20794 20795 +1
Branches 3137 3137
=======================================
+ Hits 16991 16992 +1
Misses 3662 3662
Partials 141 141
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Test Results
4 files ±0 316 suites ±0 32m 45s :stopwatch: -8s 1 136 tests ±0 1 136 :white_check_mark: ±0 0 :zzz: ±0 0 :x: ±0 1 146 runs ±0 1 146 :white_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 33287f78. ± Comparison against base commit 7080b661.