sr-npm 1.7.278 → 1.7.280

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.278",
3
+ "version": "1.7.280",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,6 +18,7 @@ const {
18
18
  let queryKeyWordVar;
19
19
  let queryDepartmentVar;
20
20
  let queryLocationVar;
21
+ let searchInputBlurredFirstTime=true;
21
22
  async function careersPageOnReady(_$w,thisObject,queryParams) {
22
23
  console.log("queryParams: ", queryParams);
23
24
  const { page, keyWord, department, location } = queryParams;
@@ -163,8 +164,11 @@ function init(_$w) {
163
164
  const debouncedSearch = debounce(()=>applyFilters(_$w), 400,thisObjectVar);
164
165
  _$w('#searchInput').onInput(debouncedSearch);
165
166
  _$w('#searchInput').onBlur(()=>{
166
- console.log("search input blurred");
167
+ if(searchInputBlurredFirstTime && _$w('#searchInput').value.trim() !== '')
168
+ {
167
169
  _$w('#searchInput').focus();
170
+ searchInputBlurredFirstTime=false;
171
+ }
168
172
  });
169
173
  _$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()=>applyFilters(_$w));
170
174
  _$w('#resetFiltersButton, #clearSearch').onClick(()=>resetFilters(_$w));
@@ -179,15 +183,6 @@ function init(_$w) {
179
183
 
180
184
  }
181
185
 
182
- function onchangeSearchInput(_$w){
183
- const debouncedSearch = debounce(()=>applyFilters(_$w), 400,thisObjectVar);
184
- debouncedSearch();
185
- _$w('#searchInput').focus();
186
-
187
-
188
- console.log("onchangeSearchInput");
189
- searchInputIsUsed=true;
190
- }
191
186
 
192
187
  async function applyFilters(_$w, skipUrlUpdate = false) {
193
188
  console.log("applying filters");