Fix the overflow style for "Hide all checks" (#27932)

Fix #27928

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
wxiaoguang 2023-11-08 02:53:35 +08:00 committed by GitHub
parent e80f446d3a
commit 10a6ebb3fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 6 deletions

View file

@ -4,9 +4,7 @@ export function initRepoPullRequestCommitStatus() {
const list = panel.querySelector('.commit-status-list');
btn.addEventListener('click', () => {
list.style.maxHeight = list.style.maxHeight ? '' : '0px'; // toggle
list.style.overflow = 'hidden'; // hide scrollbar when hiding
btn.textContent = btn.getAttribute(list.style.maxHeight ? 'data-show-all' : 'data-hide-all');
});
list.addEventListener('animationend', () => list.style.overflow = '');
}
}