sr-npm 1.7.276 → 1.7.278

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.276",
3
+ "version": "1.7.278",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,6 @@ const {
18
18
  let queryKeyWordVar;
19
19
  let queryDepartmentVar;
20
20
  let queryLocationVar;
21
- let searchInputIsUsed=false;
22
21
  async function careersPageOnReady(_$w,thisObject,queryParams) {
23
22
  console.log("queryParams: ", queryParams);
24
23
  const { page, keyWord, department, location } = queryParams;
@@ -163,8 +162,10 @@ async function bind(_$w) {
163
162
  function init(_$w) {
164
163
  const debouncedSearch = debounce(()=>applyFilters(_$w), 400,thisObjectVar);
165
164
  _$w('#searchInput').onInput(debouncedSearch);
166
- _$w('#searchInput').onFocus(()=>searchInputIsUsed=true);
167
- _$w('#searchInput').onBlur(()=>searchInputIsUsed=false);
165
+ _$w('#searchInput').onBlur(()=>{
166
+ console.log("search input blurred");
167
+ _$w('#searchInput').focus();
168
+ });
168
169
  _$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()=>applyFilters(_$w));
169
170
  _$w('#resetFiltersButton, #clearSearch').onClick(()=>resetFilters(_$w));
170
171
 
@@ -262,11 +263,6 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
262
263
  // Update reset button state
263
264
  const hasActiveFilters = filters.length > 0;
264
265
  hasActiveFilters? _$w('#resetFiltersButton').enable() : _$w('#resetFiltersButton').disable();
265
- if(searchInputIsUsed){
266
- console.log("focusing search input");
267
- _$w('#searchInput').focus();
268
- console.log("search input focused");
269
- }
270
266
 
271
267
 
272
268
  }