From 0c11d62c0c4c18fa2ad9c854d0d34ae0cdbdc7f4 Mon Sep 17 00:00:00 2001 From: Nikola Anachkov Date: Fri, 20 Dec 2024 15:51:18 +0200 Subject: [PATCH] fix(ui5-dynamic-page): update header sticky on manual snap --- packages/fiori/src/DynamicPage.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/fiori/src/DynamicPage.ts b/packages/fiori/src/DynamicPage.ts index b4b9e9259c95..e45ef89cd7bc 100644 --- a/packages/fiori/src/DynamicPage.ts +++ b/packages/fiori/src/DynamicPage.ts @@ -327,6 +327,11 @@ class DynamicPage extends UI5Element { const headerHeight = this.dynamicPageHeader.getBoundingClientRect().height; const lastHeaderSnapped = this._headerSnapped; + if (this._headerSnapped && scrollTop > headerHeight) { + this.showHeaderInStickArea = false; + return; + } + const shouldSnap = !this._headerSnapped && scrollTop > headerHeight + SCROLL_THRESHOLD; const shouldExpand = this._headerSnapped && (scrollTop < headerHeight - SCROLL_THRESHOLD || (!scrollTop && !headerHeight));