mirror of
https://github.com/mastodon/mastodon
synced 2025-01-10 03:43:01 +09:00
Fix Chromium showing scrollbar on embedded posts (#33237)
This commit is contained in:
parent
801cd731be
commit
58c5068bda
@ -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,14 +107,8 @@ body {
|
|||||||
&.embed {
|
&.embed {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
|
||||||
.container {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.admin {
|
&.admin {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user