feat(cdk/overlay): connected-overlay directive should have input for disabling escape close
See original GitHub issueFeature Description
Currently connected-overlay is hardcoded to be closed on escape. https://github.com/angular/components/blob/5f125395e0d39eb7e6a34d0c3355fc474f4d37a8/src/cdk/overlay/overlay-directives.ts#L287-L289 I propose adding a way to control this behavior.
Use Case
In my project I need an overlay that does not close on keyboard event. Also, if in the overlay we have a form, there may happen a situation when user should be forced to complete it before closing the overlay.
I create overlay in this manner:
cdk-connected-overlay
cdkConnectedOverlayHasBackdrop
cdkConnectedOverlayBackdropClass="light-backdrop"
[cdkConnectedOverlayOrigin]="origin"
[cdkConnectedOverlayPositions]="positions"
[cdkConnectedOverlayOpen]="isOpen"
[cdkConnectedOverlayScrollStrategy]="scrollStrategy"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Angular cdkOverlay disable close - Stack Overflow
I would like to disable close. In the API (https://beta-angular-material-io.firebaseapp.com/cdk/overlay/api) there is the input:.
Read more >Overlay | Angular Material
Directive applied to an element to make it usable as an origin for an Overlay using a ConnectedPositionStrategy. Selector: [cdk-overlay-origin] ...
Read more >@angular/cdk | Yarn - Package Manager
The Angular team builds and maintains both common UI components and tools to help you build your own custom components. The team maintains...
Read more >Angular CDK - Overlay Module Pt.2 (Advanced, 2020)
In this tutorial, we will have a look at such advanced topics as overlay positioning, overlay position strategies, handling of scrolling ...
Read more >@angular/material: Versions | Openbase
fixup! feat(material/dialog): Switch dialog implementation to use MDC ... overlay: connected-overlay directive should have input for disabling escape close ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Any update on this feature, for us it’s something crucial … We can contribute if you need any help 😉
Yes, it was solved for me when it was released. I don’t remember the details but I see that we are using it