Skip to content

Commit 86ba755

Browse files
committed
refactor(cdk/overlay): test out enabling popover by default
Tries to enable popovers in the CDK overlay by default to see how hard it'll be to land.
1 parent 969a9ab commit 86ba755

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cdk/overlay/overlay-directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
253253

254254
/** Whether the connected overlay should be rendered inside a popover element or the overlay container. */
255255
@Input({alias: 'cdkConnectedOverlayUsePopover'})
256-
usePopover: FlexibleOverlayPopoverLocation | null = null;
256+
usePopover: FlexibleOverlayPopoverLocation | null = 'global';
257257

258258
/** Whether the overlay should match the trigger's width. */
259259
@Input({alias: 'cdkConnectedOverlayMatchWidth', transform: booleanAttribute})

src/cdk/overlay/overlay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function createOverlayRef(injector: Injector, config?: OverlayConfig): Ov
5454
const overlayConfig = new OverlayConfig(config);
5555

5656
overlayConfig.direction = overlayConfig.direction || directionality.value;
57-
overlayConfig.usePopover = !!overlayConfig?.usePopover && 'showPopover' in doc.body;
57+
overlayConfig.usePopover = 'showPopover' in doc.body;
5858

5959
const pane = doc.createElement('div');
6060
const host = doc.createElement('div');

0 commit comments

Comments
 (0)