diff --git a/packages/html-reporter/src/testResultView.tsx b/packages/html-reporter/src/testResultView.tsx
index 82a3650414..0a6c5a85a4 100644
--- a/packages/html-reporter/src/testResultView.tsx
+++ b/packages/html-reporter/src/testResultView.tsx
@@ -122,16 +122,23 @@ const ImageDiff: React.FunctionComponent<{
diff?: TestAttachment,
}> = ({ actual, expected, diff }) => {
const [selectedTab, setSelectedTab] = React.useState('actual');
+ const diffElement = React.useRef(null);
const tabs = [];
tabs.push({
id: 'actual',
title: 'Actual',
- render: () =>
+ render: () =>
{
+ if (diffElement.current)
+ diffElement.current.style.minHeight = diffElement.current.offsetHeight + 'px';
+ }}/>
});
tabs.push({
id: 'expected',
title: 'Expected',
- render: () =>
+ render: () =>
{
+ if (diffElement.current)
+ diffElement.current.style.minHeight = diffElement.current.offsetHeight + 'px';
+ }}/>
});
if (diff) {
tabs.push({
@@ -140,7 +147,7 @@ const ImageDiff: React.FunctionComponent<{
render: () =>
});
}
- return