fix: keep CHRNX header focus visible

This commit is contained in:
chrnx committed 2026-08-11 19:57:47 -05:00
1 parent 43e4689206
commit f043a9b7bd
2 files changed
+102

No files matched your search

+9
View File
@@ -182,10 +182,19 @@
setActivePanel( null );
}
};
const focusSafely = ( element ) => {
try {
element.focus( { preventScroll: true } );
} catch {
element.focus();
}
};
const onMenuClick = () => {
focusSafely( menuButton );
setActivePanel( activePanel === PANEL.menu ? null : PANEL.menu );
};
const onThemeClick = () => {
focusSafely( themeButton );
setActivePanel( activePanel === PANEL.theme ? null : PANEL.theme );
};
const onSearchSubmit = ( event ) => {