diff --git a/packages/main/src/components/ObjectPage/index.tsx b/packages/main/src/components/ObjectPage/index.tsx index 88d81d7dff6..4e2b7b3617b 100644 --- a/packages/main/src/components/ObjectPage/index.tsx +++ b/packages/main/src/components/ObjectPage/index.tsx @@ -731,15 +731,12 @@ const ObjectPage = forwardRef((props, ref ref={objectPageContentRef} // prevent content scroll when elements outside the content are focused onFocus={() => { - objectPageRef.current.style.scrollPaddingBlockStart = `${Math.ceil(topHeaderHeight + TAB_CONTAINER_HEADER_HEIGHT + (!headerCollapsed && headerPinned ? headerContentHeight : 0))}px`; - if (footerArea) { - objectPageRef.current.style.scrollPaddingBlockEnd = 'calc(var(--_ui5wcr-BarHeight) + 0.5rem)'; - } + // 12px or 0.75rem margin for ui5wc border and input margins + objectPageRef.current.style.scrollPaddingBlock = `${Math.ceil(12 + topHeaderHeight + TAB_CONTAINER_HEADER_HEIGHT + (!headerCollapsed && headerPinned ? headerContentHeight : 0))}px ${footerArea ? 'calc(var(--_ui5wcr-BarHeight) + 1.25rem)' : 0}`; }} onBlur={(e) => { if (!e.currentTarget.contains(e.relatedTarget as Node)) { - objectPageRef.current.style.scrollPaddingBlockStart = '0px'; - objectPageRef.current.style.scrollPaddingBlockEnd = '0px'; + objectPageRef.current.style.scrollPaddingBlock = '0px'; } }} >