From 1a0dc7b76e91702f5a894afc433b0f031f7fe329 Mon Sep 17 00:00:00 2001 From: Aliullov Vlad <91639107+GoodDayForSurf@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:17:09 +0400 Subject: [PATCH] Fix Dropdowns of editors do not scroll with the page (T1188807). (#189) * Fix Dropdowns of editors do not scroll with the page (T1188807). Fire scroll event from body to force hiding opened editors dropdowns, because is theirs scroll parent --- src/app/left-menu/main/left-menu.component.html | 4 ++-- src/app/left-menu/main/left-menu.component.ts | 4 ++++ src/app/preview/editors/editors.component.html | 6 +++--- src/app/preview/editors/editors.component.ts | 2 +- src/app/preview/preview/preview.component.html | 6 +++--- src/app/preview/preview/preview.component.ts | 4 ++++ 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/app/left-menu/main/left-menu.component.html b/src/app/left-menu/main/left-menu.component.html index 67f41868..fe68d1ca 100644 --- a/src/app/left-menu/main/left-menu.component.html +++ b/src/app/left-menu/main/left-menu.component.html @@ -1,7 +1,7 @@
- +
@@ -46,7 +46,7 @@
- +
diff --git a/src/app/left-menu/main/left-menu.component.ts b/src/app/left-menu/main/left-menu.component.ts index 8ca2afbe..aa3a52bf 100644 --- a/src/app/left-menu/main/left-menu.component.ts +++ b/src/app/left-menu/main/left-menu.component.ts @@ -187,6 +187,10 @@ export class LeftMenuComponent implements OnDestroy, OnInit { }); } + fireScrollEventForClosingDropdowns() { + document.body.dispatchEvent(new Event('scroll')); + } + ngOnDestroy(): void { this.subscription.unsubscribe(); } diff --git a/src/app/preview/editors/editors.component.html b/src/app/preview/editors/editors.component.html index 4853ed63..ef9e7f18 100644 --- a/src/app/preview/editors/editors.component.html +++ b/src/app/preview/editors/editors.component.html @@ -40,7 +40,7 @@
- +
@@ -70,7 +70,7 @@
- +
@@ -100,7 +100,7 @@
- +
diff --git a/src/app/preview/editors/editors.component.ts b/src/app/preview/editors/editors.component.ts index 17ccdbf2..4329eac2 100644 --- a/src/app/preview/editors/editors.component.ts +++ b/src/app/preview/editors/editors.component.ts @@ -11,7 +11,7 @@ export class EditorsComponent implements OnInit, OnDestroy { widgetGroup = 'editors'; isExpanded = new BehaviorSubject(false); subscription: Subscription; - + dropDownOptions = {hideOnParentScroll: true}; labelMode = 'floating'; ngOnInit(): void { diff --git a/src/app/preview/preview/preview.component.html b/src/app/preview/preview/preview.component.html index c9791b5b..759e6190 100644 --- a/src/app/preview/preview/preview.component.html +++ b/src/app/preview/preview/preview.component.html @@ -1,4 +1,4 @@ - +
@@ -51,7 +51,7 @@
-
+
LIST
@@ -110,7 +110,7 @@
-
+
diff --git a/src/app/preview/preview/preview.component.ts b/src/app/preview/preview/preview.component.ts index 080232ff..934d9d1f 100644 --- a/src/app/preview/preview/preview.component.ts +++ b/src/app/preview/preview/preview.component.ts @@ -113,4 +113,8 @@ export class PreviewComponent implements AfterViewInit, OnChanges { ngAfterViewInit(): void { this.createPreviewContent(this.widgetName); } + + fireScrollEventForClosingDropdowns() { + document.body.dispatchEvent(new Event('scroll')); + } }