Skip to content

Commit e7f4b03

Browse files
author
Rik Roots
committed
Add scrolling="no" attribute to iframe for Datawrapper iframes
1 parent 09eec26 commit e7f4b03

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)