Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libs/components/src/dialog/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
'tw-border-secondary-100': showFooterBorder,
}"
>
<p>{{ isScrollable }}</p>
<ng-content select="[bitDialogFooter]"></ng-content>
</footer>
</section>
4 changes: 4 additions & 0 deletions libs/components/src/utils/has-scrollable-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ export const hasScrollableContent$ = (
observeOn(animationFrameScheduler),
map((entry: IntersectionObserverEntry | null) => {
if (!entry) {
document.body.prepend(
`[without entry: root ${root.scrollHeight} > client ${root.clientHeight}]`,
);
return root.scrollHeight > root.clientHeight;
}
document.body.prepend(`[with entry: ${!entry.isIntersecting}]`);
return !entry.isIntersecting;
}),
distinctUntilChanged(),
Expand Down
Loading