File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -2048,6 +2048,11 @@ window.addEventListener("keydown", event => {
20482048 if ( event . code === "Escape" ) {
20492049 hideMenus ( ) ;
20502050 hideModals ( ) ;
2051+ } else if ( ( event . ctrlKey || event . metaKey ) && event . key === 'f' ) {
2052+ event . preventDefault ( ) ; // Prevent the default browser behavior
2053+ searchContainer . classList . toggle ( 'active' ) ;
2054+ // focus it
2055+ setTimeout ( ( ) => searchInput . focus ( ) , 200 ) ; // cant focus it immediate with the transition, Delay focus to ensure visibility
20512056 }
20522057} ) ;
20532058
@@ -2429,14 +2434,6 @@ function filterDials(searchTerm) {
24292434 animate ( ) ;
24302435}
24312436
2432- document . addEventListener ( 'keydown' , ( event ) => {
2433- if ( ( event . ctrlKey || event . metaKey ) && event . key === 'f' ) {
2434- event . preventDefault ( ) ; // Prevent the default browser behavior
2435- searchContainer . classList . toggle ( 'active' ) ;
2436- // focus it
2437- setTimeout ( ( ) => searchInput . focus ( ) , 200 ) ; // cant focus it immediate with the transition, Delay focus to ensure visibility
2438- }
2439- } ) ;
24402437
24412438document . getElementById ( 'closeSearch' ) . addEventListener ( 'click' , ( ) => {
24422439 const searchInput = document . getElementById ( 'searchInput' ) ;
You can’t perform that action at this time.
0 commit comments