@@ -33,7 +33,7 @@ const ObjectPageCssVariables = {
33
33
titleFontSize : '--_ui5wcr_ObjectPage_title_fontsize' ,
34
34
} ;
35
35
36
- const TAB_CONTAINER_HEADER_HEIGHT = 44 ;
36
+ const TAB_CONTAINER_HEADER_HEIGHT = 44 + 4 ; // tabbar height + custom 4px padding-block-start
37
37
38
38
/**
39
39
* 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
83
83
const prevTopHeaderHeight = useRef ( 0 ) ;
84
84
// @ts -expect-error: useSyncRef will create a ref if not present
85
85
const [ componentRefHeaderContent , headerContentRef ] = useSyncRef ( headerArea ?. ref ) ;
86
- const anchorBarRef = useRef < HTMLDivElement > ( null ) ;
87
86
const scrollEvent = useRef ( undefined ) ;
88
87
const objectPageContentRef = useRef < HTMLDivElement > ( null ) ;
89
88
const selectionScrollTimeout = useRef ( null ) ;
@@ -128,19 +127,17 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
128
127
} , [ ] ) ;
129
128
130
129
// 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
+ ) ;
144
141
145
142
useEffect ( ( ) => {
146
143
if ( typeof onToggleHeaderArea === 'function' && isToggledRef . current ) {
@@ -197,7 +194,6 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
197
194
const scrollMargin =
198
195
- 1 /* reduce margin-block so that intersection observer detects correct section*/ +
199
196
safeTopHeaderHeight +
200
- anchorBarHeight +
201
197
TAB_CONTAINER_HEADER_HEIGHT +
202
198
( headerPinned && ! headerCollapsed ? headerContentHeight : 0 ) ;
203
199
section . style . scrollMarginBlockStart = scrollMargin + 'px' ;
@@ -642,7 +638,6 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
642
638
{ headerArea && titleArea && (
643
639
< div
644
640
data-component-name = "ObjectPageAnchorBar"
645
- ref = { anchorBarRef }
646
641
className = { classNames . anchorBar }
647
642
style = { {
648
643
top :
0 commit comments