File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,14 @@ $(function() {
33
44 $ ( ".reserved-indicator" ) . each ( window . nuget . setPopovers ) ;
55
6+ const storage = window [ 'localStorage' ] ;
7+ const focusResultsColumnKey = 'focus_results_column' ;
8+
9+ if ( storage && storage . getItem ( focusResultsColumnKey ) ) {
10+ storage . removeItem ( focusResultsColumnKey ) ;
11+ document . getElementById ( 'results-column' ) . focus ( { preventScroll : true } ) ;
12+ }
13+
614 const searchForm = document . forms . search ;
715 const allFrameworks = document . querySelectorAll ( '.framework' ) ;
816 const allTfms = document . querySelectorAll ( '.tfm' ) ;
@@ -69,6 +77,11 @@ $(function() {
6977 function submitSearchForm ( ) {
7078 constructFilterParameter ( searchForm . frameworks , allFrameworks ) ;
7179 constructFilterParameter ( searchForm . tfms , allTfms ) ;
80+
81+ if ( storage ) {
82+ storage . setItem ( focusResultsColumnKey , true ) ;
83+ }
84+
7285 searchForm . submit ( ) ;
7386 }
7487
Original file line number Diff line number Diff line change 135135 </div >
136136 }
137137 </div >
138- <div class =" @(Model.IsAdvancedSearchFlightEnabled ? " col-md-9 " : " col-md-12 " )" id =" results-column" >
138+ <div class =" @(Model.IsAdvancedSearchFlightEnabled ? " col-md-9 " : " col-md-12 " )" id =" results-column" tabindex = " 0 " >
139139 <div class =" row" >
140140 <div class =" col-md-9" >
141141 <h1 tabindex =" 0" >
You can’t perform that action at this time.
0 commit comments