fix: restore CHRNX search focus on resize
This commit is contained in:
3 files changed
+45
-2
No files matched your search
@@ -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 );
|
||||
|
||||
Reference in new issue
Block a user