diff --git a/packages/dnb-eufemia/src/components/table/TableStickyHeader.tsx b/packages/dnb-eufemia/src/components/table/TableStickyHeader.tsx index ea87174b3ee..b5761981440 100644 --- a/packages/dnb-eufemia/src/components/table/TableStickyHeader.tsx +++ b/packages/dnb-eufemia/src/components/table/TableStickyHeader.tsx @@ -51,7 +51,6 @@ export const useStickyHeader = ({ 'thead > tr:first-of-type, thead > .dnb-table__tr:first-of-type' ) const thElem = getThElement(tableElem) - const inIframe = window.self !== window.top const setSizes = () => { offsetTopPx = parseFloat(String(stickyOffset)) || 0 @@ -96,7 +95,7 @@ export const useStickyHeader = ({ thHeight = thElem.offsetHeight tableHeight = tableElem.offsetHeight tableOffset = getOffsetTop(tableElem) - totalOffset = tableOffset - (inIframe ? 0 : offsetTopPx) + totalOffset = tableOffset - offsetTopPx if (sticky === 'css-position') { trElem.style.setProperty( diff --git a/packages/dnb-eufemia/src/components/table/__tests__/TableStickyHeader.test.tsx b/packages/dnb-eufemia/src/components/table/__tests__/TableStickyHeader.test.tsx index e2d4ad90085..515a45a92e0 100644 --- a/packages/dnb-eufemia/src/components/table/__tests__/TableStickyHeader.test.tsx +++ b/packages/dnb-eufemia/src/components/table/__tests__/TableStickyHeader.test.tsx @@ -187,9 +187,6 @@ describe('useStickyHeader', () => { '304px' ) - // Simulate iFrame - jest.spyOn(window, 'self', 'get').mockReturnValue(null) - rerender(