From cbef894dfb10deb1b042d2ea3673731ca104111d Mon Sep 17 00:00:00 2001 From: AndreiBaicu26 <56998711+AndreiBaicu26@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:41:49 +0200 Subject: [PATCH] fix(overlay): remove flex display for dialog (#4902) --- packages/overlay/src/OverlayPopover.ts | 8 +++----- packages/overlay/src/overlay.css | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/overlay/src/OverlayPopover.ts b/packages/overlay/src/OverlayPopover.ts index 8554076c39..5be607f092 100644 --- a/packages/overlay/src/OverlayPopover.ts +++ b/packages/overlay/src/OverlayPopover.ts @@ -97,9 +97,7 @@ export function OverlayPopover>( }); } - private async shouldShowPopover( - targetOpenState: boolean - ): Promise { + private shouldShowPopover(targetOpenState: boolean): void { let popoverOpen = false; try { popoverOpen = this.dialogEl.matches(':popover-open'); @@ -118,7 +116,7 @@ export function OverlayPopover>( this.isConnected ) { this.dialogEl.showPopover(); - await this.managePosition(); + this.managePosition(); } } @@ -129,7 +127,7 @@ export function OverlayPopover>( if (!supportsOverlayAuto) { await this.shouldHidePopover(targetOpenState); } - await this.shouldShowPopover(targetOpenState); + this.shouldShowPopover(targetOpenState); await nextFrame(); } diff --git a/packages/overlay/src/overlay.css b/packages/overlay/src/overlay.css index ac1f3ab8c9..0fd608f2e3 100644 --- a/packages/overlay/src/overlay.css +++ b/packages/overlay/src/overlay.css @@ -39,7 +39,6 @@ governing permissions and limitations under the License. border: 0; background: none; padding: 0; - display: flex; position: fixed; overflow: visible; opacity: 1 !important; @@ -180,7 +179,8 @@ slot[name='longpress-describedby-descriptor'] { @supports (overlay: auto) { .dialog { display: none; - transition: all + transition: + all var( --mod-overlay-animation-duration, var(--spectrum-animation-duration-100, 0.13s)