Skip to content

Commit e58d335

Browse files
authored
Merge pull request #13574 from guardian/rjr-fix-datawrapper-iframe-scrollbar-issue
Add scrolling="no" attribute to iframe for Datawrapper iframes
2 parents eb63c91 + 1bc1146 commit e58d335

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,11 @@ export const InteractiveBlockComponent = ({
343343
iframe.src = url;
344344
}
345345

346+
// Datawrapper-specific fix to suppress scrollbars appearing
347+
if (url.includes('datawrapper')) {
348+
iframe.scrolling = 'no';
349+
}
350+
346351
setupWindowListeners(iframe);
347352

348353
wrapperRef.current?.prepend(iframe);

0 commit comments

Comments
 (0)