Skip to content

Commit c85619b

Browse files
authored
Fix download buttons on branches page (#30147)
Fixes #30143, regression from #29920. We have `.button` on the repo page, but on the branch page it's a `.btn`. Eventually we should find a solution to have a single button class but until then this solution should be acceptable.
1 parent 1ad48f7 commit c85619b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

web_src/css/modules/animations.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
opacity: 0.3;
1414
}
1515

16+
.btn.is-loading > *,
1617
.button.is-loading > * {
1718
opacity: 0;
1819
}

web_src/js/features/repo-common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {hideElem, showElem} from '../utils/dom.js';
33
import {POST} from '../modules/fetch.js';
44

55
async function getArchive($target, url, first) {
6-
const dropdownBtn = $target[0].closest('.ui.dropdown.button');
6+
const dropdownBtn = $target[0].closest('.ui.dropdown.button') ?? $target[0].closest('.ui.dropdown.btn');
77

88
try {
99
dropdownBtn.classList.add('is-loading');

0 commit comments

Comments
 (0)