Skip to content

Commit

Permalink
Fix: Enable scroll when user moves to a different tab
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajNyiri committed Jun 15, 2021
1 parent 1354c4b commit e56475a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions dist/plex-meets-homeassistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
});
Expand Down
3 changes: 1 addition & 2 deletions src/plex-meets-homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
});
Expand Down

0 comments on commit e56475a

Please sign in to comment.