mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-15 10:25:18 +00:00
Fix install dropdown render2 (#2118)
* fix: close other install dropdowns when opening a new one * fix: render install dropdown above resource item siblings
This commit is contained in:
@@ -554,6 +554,18 @@ export function setupDropdownCloseHandlers(): void {
|
||||
e.preventDefault();
|
||||
const isOpen = dropdown.classList.toggle("open");
|
||||
toggle.setAttribute("aria-expanded", String(isOpen));
|
||||
|
||||
if (isOpen) {
|
||||
document
|
||||
.querySelectorAll('.install-dropdown[data-install-scope="list"].open')
|
||||
.forEach((openDropdown) => {
|
||||
if (openDropdown === dropdown) return;
|
||||
openDropdown.classList.remove("open");
|
||||
openDropdown.querySelector(".install-btn-toggle")
|
||||
?.setAttribute("aria-expanded", "false");
|
||||
});
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user