[Glitch] Fix Chromium showing scrollbar on embedded posts

Port 58c5068bda to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire committed 2024-12-25 21:21:39 +01:00
1 parent bb17ffac92
commit 967e095724
2 files changed
+5 -7

No files matched your search

@@ -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(
@@ -107,13 +107,7 @@ body {
&.embed {
margin: 0;
padding-bottom: 0;
.container {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
}
overflow: hidden;
}
&.admin {