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 StackBlitz scroll-strategy-block creates a CDK Overlay declaratively (anchored to a button).
Resize the window to force a scrollbar:
At this point, scrolling should be blocked since the BlockScrollStrategy is bound to the cdkConnectedOverlayScrollStrategy property of the cdkConnectedOverlay.
The cdkConnectedOverlayScrollStrategy is provided as a property.
StackBlitz is a fork of Google sidenav example (hence the weird file names). Importantly, the constructor injects ScrollStrategyOptions and defines the block method.
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular 5.2.9 (also experienced with 6.0.0-rc.2)
typescript 2.7.2
Linux - Debian
Is there anything else we should know?
The Stackblitz has some debug code whereby a reference to the cdk-connected-overlay is passed into the attach() and detach() events and the scrollStrategy logged to the console.
Bug, feature request, or proposal: Bug
What is the expected behavior?
Scrolling should be blocked when using
BlockScrollStrategy
. See ScrollStrategyOptions in the CDK Overlay documentation.What is the current behavior?
Scrolling is not blocked.
What are the steps to reproduce?
The StackBlitz scroll-strategy-block creates a CDK Overlay declaratively (anchored to a button).
Resize the window to force a scrollbar:
At this point, scrolling should be blocked since the BlockScrollStrategy is bound to the
cdkConnectedOverlayScrollStrategy
property of thecdkConnectedOverlay
.The overlay is anchored to a button:
<button mat-button #trigger="cdkOverlayOrigin" cdkOverlayOrigin>cdkOverlayOrigin</button>
The overlay just contains text within a
mat-card
:The
cdkConnectedOverlayScrollStrategy
is provided as a property.StackBlitz is a fork of Google sidenav example (hence the weird file names). Importantly, the constructor injects
ScrollStrategyOptions
and defines the block method.What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
angular 5.2.9 (also experienced with 6.0.0-rc.2)
typescript 2.7.2
Linux - Debian
Is there anything else we should know?
The Stackblitz has some debug code whereby a reference to the
cdk-connected-overlay
is passed into theattach()
anddetach()
events and thescrollStrategy
logged to the console.The text was updated successfully, but these errors were encountered: