mirror of
https://github.com/github/awesome-copilot.git
synced 2026-06-25 17:00:20 +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;
|
||||
}
|
||||
|
||||
|
||||
@@ -868,7 +868,6 @@ body:has(#main-content) {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--border-radius);
|
||||
box-shadow: var(--shadow-md);
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(-8px);
|
||||
@@ -1875,6 +1874,11 @@ body:has(#main-content) {
|
||||
transform: translateX(4px);
|
||||
box-shadow: var(--shadow);
|
||||
border-radius: 0px var(--border-radius-lg) var(--border-radius-lg) 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.resource-item:has(.install-dropdown.open) {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.resource-item:hover::before,
|
||||
|
||||
Reference in New Issue
Block a user