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.
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:
cdkConnectedOverlayHasBackdrop
cdkConnectedOverlayBackdropClass="light-backdrop"
[cdkConnectedOverlayOrigin]="origin"
[cdkConnectedOverlayPositions]="positions"
[cdkConnectedOverlayOpen]="isOpen"
[cdkConnectedOverlayScrollStrategy]="scrollStrategy"
Any update on this feature, for us it's something crucial ...
We can contribute if you need any help ;)
@devversion Can you take a look if PR with this feature is good enough? #20585
It's not breaking change, just nice and necessary feature
Most helpful comment
Any update on this feature, for us it's something crucial ...
We can contribute if you need any help ;)