Skip to content

Commit 86ce5c9

Browse files
committed
[UX] Scrolling area optimization.
1 parent 5133d5d commit 86ce5c9

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/ui/popup.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ html:not(.mobile) > body {
2121
html:not(.mobile) #scrollable {
2222
overflow: auto;
2323
max-height: 550px;
24-
min-height: 200px;
24+
min-height: 2em;
2525
}
2626

2727
#top {

src/ui/ui.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ fieldset > .opt-group ~ .opt-group {
4343
opacity: 0;
4444
transition: opacity .5s, max-height .5s;
4545
pointer-events: none;
46+
overflow: hidden;
4647
}
4748

4849
@media (max-width: 550px) {

src/ui/ui.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,13 @@ var UI = (() => {
855855
if (temp) temp.checked = !temp.checked || UI.forceIncognito;
856856
}
857857
};
858+
if (!UA.mobile) {
859+
const scrollable = document.querySelector("#scrollable");
860+
if (scrollable) {
861+
scrollable.style = "min-height: 0";
862+
scrollable.style.height = (scrollable.offsetHeight + customizer.querySelector("fieldset").offsetHeight + 8) + "px";
863+
}
864+
}
858865
window.setTimeout(
859866
() => {
860867
row.classList.toggle("customizing", true);

0 commit comments

Comments
 (0)