Skip to content

Commit 7b177d3

Browse files
KarenKonounijel
authored andcommitted
fix: sort by toggle icon
1 parent 33c77e7 commit 7b177d3

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

weblate/static/loader-bootstrap.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ function hide(element) {
1515
element.style.display = "none";
1616
}
1717
}
18-
function toggleDisplay(element) {
19-
if (!element) {
20-
return;
21-
}
22-
if (getComputedStyle(element).display === "none") {
23-
element.style.display = "";
24-
} else {
25-
element.style.display = "none";
26-
}
27-
}
2818
function onReady(callback) {
2919
if (document.readyState === "loading") {
3020
document.addEventListener("DOMContentLoaded", callback);
@@ -1711,7 +1701,9 @@ onReady(() => {
17111701
sortValue.replace("-", "") === sortDropdownValue.replace("-", "") &&
17121702
sortValue !== sortDropdownValue
17131703
) {
1714-
document.querySelectorAll("span.search-icon").forEach(toggleDisplay);
1704+
document.querySelectorAll("span.search-icon").forEach((icon) => {
1705+
icon.classList.toggle("active");
1706+
});
17151707
}
17161708
}
17171709
}

0 commit comments

Comments
 (0)