@@ -33,7 +33,7 @@ const ObjectPageCssVariables = {
3333 titleFontSize : '--_ui5wcr_ObjectPage_title_fontsize' ,
3434} ;
3535
36- const TAB_CONTAINER_HEADER_HEIGHT = 44 ;
36+ const TAB_CONTAINER_HEADER_HEIGHT = 44 + 4 ; // tabbar height + custom 4px padding-block-start
3737
3838/**
3939 * A component that allows apps to easily display information related to a business object.
@@ -83,7 +83,6 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
8383 const prevTopHeaderHeight = useRef ( 0 ) ;
8484 // @ts -expect-error: useSyncRef will create a ref if not present
8585 const [ componentRefHeaderContent , headerContentRef ] = useSyncRef ( headerArea ?. ref ) ;
86- const anchorBarRef = useRef < HTMLDivElement > ( null ) ;
8786 const scrollEvent = useRef ( undefined ) ;
8887 const objectPageContentRef = useRef < HTMLDivElement > ( null ) ;
8988 const selectionScrollTimeout = useRef ( null ) ;
@@ -128,19 +127,17 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
128127 } , [ ] ) ;
129128
130129 // observe heights of header parts
131- const { topHeaderHeight, headerContentHeight, anchorBarHeight, totalHeaderHeight, headerCollapsed } =
132- useObserveHeights (
133- objectPageRef ,
134- topHeaderRef ,
135- headerContentRef ,
136- anchorBarRef ,
137- [ headerCollapsedInternal , setHeaderCollapsedInternal ] ,
138- {
139- noHeader : ! titleArea && ! headerArea ,
140- fixedHeader : headerPinned ,
141- scrollTimeout,
142- } ,
143- ) ;
130+ const { topHeaderHeight, headerContentHeight, totalHeaderHeight, headerCollapsed } = useObserveHeights (
131+ objectPageRef ,
132+ topHeaderRef ,
133+ headerContentRef ,
134+ [ headerCollapsedInternal , setHeaderCollapsedInternal ] ,
135+ {
136+ noHeader : ! titleArea && ! headerArea ,
137+ fixedHeader : headerPinned ,
138+ scrollTimeout,
139+ } ,
140+ ) ;
144141
145142 useEffect ( ( ) => {
146143 if ( typeof onToggleHeaderArea === 'function' && isToggledRef . current ) {
@@ -197,7 +194,6 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
197194 const scrollMargin =
198195 - 1 /* reduce margin-block so that intersection observer detects correct section*/ +
199196 safeTopHeaderHeight +
200- anchorBarHeight +
201197 TAB_CONTAINER_HEADER_HEIGHT +
202198 ( headerPinned && ! headerCollapsed ? headerContentHeight : 0 ) ;
203199 section . style . scrollMarginBlockStart = scrollMargin + 'px' ;
@@ -642,7 +638,6 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
642638 { headerArea && titleArea && (
643639 < div
644640 data-component-name = "ObjectPageAnchorBar"
645- ref = { anchorBarRef }
646641 className = { classNames . anchorBar }
647642 style = { {
648643 top :
0 commit comments