mirror of
https://github.com/hoornet/vega.git
synced 2026-05-07 04:39:12 -07:00
Fix lightbox Escape navigating away, sidebar profile hidden at large font
This commit is contained in:
@@ -12,7 +12,10 @@ export function ImageLightbox({ images, index, onClose, onNavigate }: ImageLight
|
||||
const hasNext = index < images.length - 1;
|
||||
|
||||
const handleKeyDown = useCallback((e: KeyboardEvent) => {
|
||||
if (e.key === "Escape") onClose();
|
||||
if (e.key === "Escape") {
|
||||
e.stopImmediatePropagation();
|
||||
onClose();
|
||||
}
|
||||
if (e.key === "ArrowLeft" && hasPrev) onNavigate(index - 1);
|
||||
if (e.key === "ArrowRight" && hasNext) onNavigate(index + 1);
|
||||
}, [onClose, onNavigate, index, hasPrev, hasNext]);
|
||||
|
||||
@@ -120,8 +120,12 @@ export function Sidebar() {
|
||||
})}
|
||||
</nav>
|
||||
|
||||
{/* Account switcher (full) — expanded only */}
|
||||
{!c && <AccountSwitcher />}
|
||||
{/* Account switcher (full) — expanded only, always visible at bottom */}
|
||||
{!c && (
|
||||
<div className="shrink-0">
|
||||
<AccountSwitcher />
|
||||
</div>
|
||||
)}
|
||||
|
||||
</aside>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user