From cc27462ec32e28f1de07a74e9a19a775baa1f43b Mon Sep 17 00:00:00 2001 From: wnvko Date: Tue, 12 Mar 2019 09:25:43 +0200 Subject: [PATCH] fix(igxOverlay): set content div's position to relative, #4220 --- .../components/overlay/_overlay-component.scss | 5 +++++ .../styles/components/overlay/_overlay-theme.scss | 12 ++++++++---- .../overlay/position/global-position-strategy.ts | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-component.scss b/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-component.scss index 6dbd5bff1d2..73815aeae08 100644 --- a/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-component.scss +++ b/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-component.scss @@ -38,6 +38,11 @@ @extend %overlay-content !optional; @extend %overlay-content--elastic !optional; } + + @include e(content, $m: relative) { + @extend %overlay-content !optional; + @extend %overlay-content--relative !optional; + } } @include b(igx-toggle) { diff --git a/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-theme.scss b/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-theme.scss index 756c0ef4c38..671750f4c91 100644 --- a/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-theme.scss +++ b/projects/igniteui-angular/src/lib/core/styles/components/overlay/_overlay-theme.scss @@ -80,11 +80,15 @@ pointer-events: initial; } - %igx-toggle--hidden { - display: none !important; - } - %overlay-content--elastic { overflow: auto; } + + %overlay-content--relative { + position: relative; + } + + %igx-toggle--hidden { + display: none !important; + } } diff --git a/projects/igniteui-angular/src/lib/services/overlay/position/global-position-strategy.ts b/projects/igniteui-angular/src/lib/services/overlay/position/global-position-strategy.ts index 7ce5632a06d..67693842bdb 100644 --- a/projects/igniteui-angular/src/lib/services/overlay/position/global-position-strategy.ts +++ b/projects/igniteui-angular/src/lib/services/overlay/position/global-position-strategy.ts @@ -25,6 +25,7 @@ export class GlobalPositionStrategy implements IPositionStrategy { } position(contentElement: HTMLElement, size?: Size, document?: Document, initialCall?: boolean): void { + contentElement.classList.add('igx-overlay__content--relative'); contentElement.parentElement.classList.add('igx-overlay__wrapper--flex'); switch (this.settings.horizontalDirection) { case HorizontalAlignment.Left: