From 279d16999a7fd83ae3e6a6a60ed0df003c75cd9b Mon Sep 17 00:00:00 2001 From: Bryan Cunningham Date: Fri, 12 Sep 2025 12:05:28 -0400 Subject: [PATCH 1/3] [CL-834] Use intersection observer to determine if content scrolls (#16099) * use intersection observer to fix dynamic content load issue * set up mock intersection observer * Create reusable hasScrollable content util * return null from resize to fix type error * remove Observer mock * return observable * refactor util and remove resize * use async pipe for observable in template * remove comment left in error --- .../src/dialog/dialog/dialog.component.html | 3 +- .../src/dialog/dialog/dialog.component.ts | 32 +++++++++++-------- libs/components/src/utils/dom-observables.ts | 17 ++++++++++ .../src/utils/has-scrollable-content.ts | 26 +++++++++++++++ libs/components/src/utils/index.ts | 1 + 5 files changed, 65 insertions(+), 14 deletions(-) create mode 100644 libs/components/src/utils/dom-observables.ts create mode 100644 libs/components/src/utils/has-scrollable-content.ts diff --git a/libs/components/src/dialog/dialog/dialog.component.html b/libs/components/src/dialog/dialog/dialog.component.html index 9f140ca7624..159944dcc1f 100644 --- a/libs/components/src/dialog/dialog/dialog.component.html +++ b/libs/components/src/dialog/dialog/dialog.component.html @@ -65,9 +65,10 @@ }" > +
- + @let isScrollable = isScrollable$ | async; @let showFooterBorder = (!bodyHasScrolledFrom().top && isScrollable) || bodyHasScrolledFrom().bottom;