diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index dda11ab..f431bd8 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19695,6 +19695,10 @@ style.textContent = css ` top: 0; background-size: cover; } + .stop-scrolling { + height: 100%; + overflow: hidden; + } .contentArt { position: absolute; background-color: rgba(0, 0, 0, 0); @@ -20042,10 +20046,12 @@ class PlexMeetsHomeAssistant extends HTMLElement { }); const detailTop = parseInt(getOffset(activeElem).top, 10) - 70; const detailBottom = getDetailsBottom(seasonContainers, episodeContainers, activeElem); + console.log(this); if (this.getTop() < detailTop) { window.scroll({ top: detailTop }); + this.children[0].classList.add('stop-scrolling'); } else if (detailBottom) { if (window.innerHeight < detailBottom - detailTop) { @@ -20053,12 +20059,14 @@ class PlexMeetsHomeAssistant extends HTMLElement { window.scroll({ top: detailBottom - window.innerHeight }); + this.children[0].classList.add('stop-scrolling'); } } else { window.scroll({ top: detailTop }); + this.children[0].classList.add('stop-scrolling'); } } } diff --git a/src/modules/style.ts b/src/modules/style.ts index 9f7f6cf..26f9b0d 100644 --- a/src/modules/style.ts +++ b/src/modules/style.ts @@ -182,6 +182,10 @@ style.textContent = css` top: 0; background-size: cover; } + .stop-scrolling { + height: 100%; + overflow: hidden; + } .contentArt { position: absolute; background-color: rgba(0, 0, 0, 0); diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 1a4284d..bd1a845 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -165,22 +165,25 @@ class PlexMeetsHomeAssistant extends HTMLElement { const detailTop = parseInt(getOffset(activeElem as Element).top, 10) - 70; const detailBottom = getDetailsBottom(seasonContainers, episodeContainers, activeElem); - + console.log(this); if (this.getTop() < detailTop) { window.scroll({ top: detailTop }); + this.children[0].classList.add('stop-scrolling'); } else if (detailBottom) { if (window.innerHeight < detailBottom - detailTop) { if (detailBottom && this.getTop() + window.innerHeight > detailBottom) { window.scroll({ top: detailBottom - window.innerHeight }); + this.children[0].classList.add('stop-scrolling'); } } else { window.scroll({ top: detailTop }); + this.children[0].classList.add('stop-scrolling'); } } }