fix: restore CHRNX search focus on resize

This commit is contained in:
chrnx committed 2026-08-12 08:24:26 -05:00
1 parent 6cafab7967
commit 6df38eb4c8
3 files changed
+45 -2

No files matched your search

+8
View File
@@ -483,6 +483,14 @@ describe( 'coordinated CHRNX header shell', () => {
initialize( { document, media } );
const control = controls();
submit( control.search );
control.searchInput.focus();
media.change( true );
expect( control.searchPanel.hidden ).toBe( true );
expect( control.searchButton.getAttribute( 'aria-expanded' ) ).toBe( 'false' );
expect( document.activeElement ).toBe( control.searchButton );
media.change( false );
control.firstLink.focus();
media.change( true );
expect( document.activeElement ).toBe( control.menuButton );