mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-03 13:33:32 -05:00
[Glitch] Fix Chromium showing scrollbar on embedded posts
Port 58c5068bda2967c663202d955e65b7420db03b01 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
bb17ffac92
commit
967e095724
@ -60,6 +60,10 @@ window.addEventListener('message', (e) => {
|
|||||||
|
|
||||||
const data = e.data;
|
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
|
// We use a timeout to allow for the React page to render before calculating the height
|
||||||
afterInitialRender(() => {
|
afterInitialRender(() => {
|
||||||
window.parent.postMessage(
|
window.parent.postMessage(
|
||||||
|
@ -107,13 +107,7 @@ body {
|
|||||||
&.embed {
|
&.embed {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
overflow: hidden;
|
||||||
.container {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.admin {
|
&.admin {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user