File tree 1 file changed +1
-3
lines changed
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ function clearSearchResults() {
49
49
resultsElement . removeChild ( resultsElement . firstChild ) ;
50
50
}
51
51
resultsElement . innerHTML = "" ;
52
- searchClearBtn . setAttribute ( 'hidden' , '' ) ;
53
52
}
54
53
55
54
/**
@@ -80,13 +79,11 @@ function displaySearchResults(results) {
80
79
` . trim ( ) ;
81
80
list . append ( listItem ) ;
82
81
}
83
- searchClearBtn . removeAttribute ( 'hidden' ) ;
84
82
85
83
} else {
86
84
resultsLiveRegion . innerHTML = "No results found." ;
87
85
resultsElement . innerHTML = "No results found." ;
88
86
resultsElement . setAttribute ( 'data-results' , 'false' ) ;
89
- searchClearBtn . setAttribute ( 'hidden' , '' ) ;
90
87
}
91
88
92
89
}
@@ -151,6 +148,7 @@ if(searchClearBtn)
151
148
searchInput . value = '' ;
152
149
searchInput . focus ( ) ;
153
150
clearSearchResults ( ) ;
151
+ searchClearBtn . setAttribute ( 'hidden' , '' ) ;
154
152
} ) ;
155
153
156
154
document . addEventListener ( 'keydown' , function ( e ) {
You can’t perform that action at this time.
0 commit comments