fix ui: fix random scroller on mobile body

This commit is contained in:
nick-delirium 2024-08-30 14:05:49 +02:00
parent ed390daef8
commit 2704691852
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 4 additions and 0 deletions

View file

@ -108,6 +108,7 @@ export default class IOSPlayer extends Player {
injectPlayer = (player: HTMLElement) => {
this.screen.addToBody(player);
this.screen.addMobileStyles();
window.addEventListener('resize', () =>
this.customScale(this.customConstrains.width, this.customConstrains.height)
);

View file

@ -88,6 +88,9 @@ export default class Screen {
addMobileStyles() {
this.iframe.className = styles.mobileIframe;
this.screen.className = styles.mobileScreen;
if (this.document) {
Object.assign(this.document?.body.style, { margin: 0, overflow: 'hidden' })
}
}
addFullscreenBoundary() {