<%# icono del servidor si viene (g.icon) %>
<% if (g.icon) { %>

@@ -87,7 +87,10 @@
// after animation, hide to prevent tab focus
setTimeout(()=> container.classList.add('hidden','pointer-events-none'), 180);
}
- if (btn && list) {
+ if (btn && list) {
+ // ensure the dropdown itself is scrollable when many guilds exist
+ list.style.maxHeight = '20rem';
+ list.style.overflowY = 'auto';
btn.addEventListener('click', (e)=>{
e.stopPropagation();
const expanded = btn.getAttribute('aria-expanded') === 'true';
@@ -98,6 +101,13 @@
const id = it.getAttribute('data-id');
if (id) window.location.href = `/dashboard/${id}/overview`;
});
+ // keyboard activation (Enter / Space)
+ it.addEventListener('keydown', (ev)=>{
+ if (ev.key === 'Enter' || ev.key === ' ') {
+ ev.preventDefault();
+ it.click();
+ }
+ });
});
}
if (userBtn && userMenu) {