diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css index 5d0a6476d..984349092 100644 --- a/apps/client/src/stylesheets/style.css +++ b/apps/client/src/stylesheets/style.css @@ -2564,5 +2564,4 @@ body.desktop .title-row { height: 50px; min-height: 50px; align-items: center; - background: var(--note-split-background-color, var(--main-background-color)); } diff --git a/apps/client/src/widgets/containers/content_header.css b/apps/client/src/widgets/containers/content_header.css index 060abde12..b264f5ae9 100644 --- a/apps/client/src/widgets/containers/content_header.css +++ b/apps/client/src/widgets/containers/content_header.css @@ -1,11 +1,16 @@ .content-header-widget { position: relative; z-index: 8; + background-color: var(--main-background-color); +} + +.note-split.bgfx .content-header-widget { + background-color: transparent; } .content-header-widget.floating { position: sticky; top: 0; z-index: 11; - background-color: var(--main-background-color, #fff); + background-color: var(--main-background-color, #fff) !important; } diff --git a/apps/client/src/widgets/containers/content_header.ts b/apps/client/src/widgets/containers/content_header.ts index 32b2d13a4..cc2a3623f 100644 --- a/apps/client/src/widgets/containers/content_header.ts +++ b/apps/client/src/widgets/containers/content_header.ts @@ -47,7 +47,9 @@ export default class ContentHeader extends Container { const isScrollingUp = currentScrollTop < this.previousScrollTop; const hasMovedEnough = Math.abs(currentScrollTop - this.previousScrollTop) > this.scrollThreshold; - if (hasMovedEnough) { + if (currentScrollTop === 0) { + this.setFloating(false); + } else if (hasMovedEnough) { this.setFloating(isScrollingUp); } this.previousScrollTop = currentScrollTop;