Skip to content
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

fix(module:modal,drawer): secondary overlays not scrolling inside #8804

Conversation

ParsaArvanehPA
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Currently, when a component, such as the select component, is created using the CDK Overlay within another component that also utilizes CDK Overlay (like a modal or drawer), there is an issue with the positioning during scrolling. Specifically, the first component's position remains fixed and does not adjust to its parent. This behavior occurs because the CDK Overlay, by default, listens for scroll events on the window, which prevents the 'ConnectedPositionStrategy' from detecting changes in position effectively.

To address this issue, we simply need to configure the CDK to listen for scroll events not on the window, but on the secondary overlay. This can be accomplished by using the cdkScrollable directive.

Issue Number: #7430, #7695, #7865, #8799, #7528, #7528, #7003

What is the new behavior?

fixed the issue mentioned above.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.76%. Comparing base (099964c) to head (7a8e100).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8804      +/-   ##
==========================================
- Coverage   91.77%   91.76%   -0.01%     
==========================================
  Files         536      536              
  Lines       18455    18455              
  Branches     2816     2816              
==========================================
- Hits        16937    16936       -1     
  Misses       1209     1209              
- Partials      309      310       +1     
Flag Coverage Δ
91.76% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@HyperLife1119 HyperLife1119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment