Skip to content

Commit

Permalink
Merge pull request #420 from conlanpatrek/visibility-hack-fix
Browse files Browse the repository at this point in the history
Fix sp-tab-page scrolling bugs.
  • Loading branch information
AbdullahAlfaraj authored Nov 25, 2023
2 parents 75814b0 + 363d22d commit 8d84f17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
27 changes: 4 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,30 +340,11 @@
}

.sp-tab-page {
visibility: hidden;
/* display: none; */
flex: 1 1 auto;
/* overflow: scroll; */
overflow-y: scroll;
padding: 12px 0;
display: none;
padding: 7px;
flex-direction: column;
}

.sp-tab-page.visible-hack {
display: flex;
/* overflow: hidden; */
/* overflow-y: scroll; */
/* position: fixed; */
top: 25px;
visibility: visible;
max-width: 100%;
width: 100%;
/* margin: 0px; */
position: absolute;
width: 100%;
left: 0;
padding-left: 10px;
padding-right: 10px;
position: relative;
}

.sp-tab-page.visible {
Expand Down Expand Up @@ -1124,7 +1105,7 @@
</div>

<div
class="sp-tab-page visible-hack"
class="sp-tab-page visible"
id="sp-stable-diffusion-ui-tab-page"
>
<div id="sdTabContainer"></div>
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ Array.from(document.querySelectorAll('.sp-tab')).forEach((theTab) => {
.getAttribute('id')
.startsWith(theTab.getAttribute('id'))
) {
tabPage.classList.add('visible-hack')
tabPage.classList.add('visible')
} else {
tabPage.classList.remove('visible-hack')
tabPage.classList.remove('visible')
}
}
)
Expand Down

0 comments on commit 8d84f17

Please sign in to comment.