Fix Chromium showing scrollbar on embedded posts (#33237)

This commit is contained in:
Claire authored and GitHub committed 2024-12-10 13:02:17 +00:00
1 parent 801cd731be
commit 58c5068bda
2 files changed
+5 -7

No files matched your search

+4
View File
@@ -60,6 +60,10 @@ window.addEventListener('message', (e) => {
const data = e.data;
// Only set overflow to `hidden` once we got the expected `message` so the post can still be scrolled if
// embedded without parent Javascript support
document.body.style.overflow = 'hidden';
// We use a timeout to allow for the React page to render before calculating the height
afterInitialRender(() => {
window.parent.postMessage(