Fix: Enable scroll when user moves to a different tab

pull/16/head 1.1.0
Juraj Nyíri 3 years ago
parent 1354c4bab5
commit e56475aa1d

@ -20047,7 +20047,6 @@ 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
@ -20063,7 +20062,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
this.children[0].classList.add('stop-scrolling');
}
}
else {
else if (detailTop !== -70 && detailBottom !== -10) {
window.scroll({
top: detailTop
});

@ -167,7 +167,6 @@ 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
@ -181,7 +180,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
});
this.children[0].classList.add('stop-scrolling');
}
} else {
} else if (detailTop !== -70 && detailBottom !== -10) {
window.scroll({
top: detailTop
});

Loading…
Cancel
Save