@skyux/lookup 12.12.0 → 12.13.0

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.
@@ -1994,6 +1994,7 @@ class SkySearchComponent {
1994
1994
  #changeRef;
1995
1995
  #contentInfoProvider;
1996
1996
  #elRef;
1997
+ #manualFocus;
1997
1998
  #searchAdapter;
1998
1999
  #searchUpdated;
1999
2000
  #searchUpdatedSub;
@@ -2024,6 +2025,7 @@ class SkySearchComponent {
2024
2025
  this.mobileSearchShown = false;
2025
2026
  this.searchButtonShown = false;
2026
2027
  this.#contentInfoProvider = inject(SkyContentInfoProvider, { optional: true });
2028
+ this.#manualFocus = false;
2027
2029
  this.#searchUpdated = new Subject();
2028
2030
  this.#_debounceTime = 0;
2029
2031
  this.#_disabled = false;
@@ -2105,6 +2107,7 @@ class SkySearchComponent {
2105
2107
  }
2106
2108
  toggleSearchInput(showInput) {
2107
2109
  if (this.#searchShouldCollapse()) {
2110
+ this.#manualFocus = true;
2108
2111
  if (showInput) {
2109
2112
  this.inputAnimate = INPUT_SHOWN_STATE;
2110
2113
  }
@@ -2132,6 +2135,12 @@ class SkySearchComponent {
2132
2135
  breakpoint !== 'xs') {
2133
2136
  this.mobileSearchShown = false;
2134
2137
  }
2138
+ setTimeout(() => {
2139
+ if (this.#manualFocus && !this.searchButtonShown) {
2140
+ this.#searchAdapter.focusInput(this.#elRef);
2141
+ this.#manualFocus = false;
2142
+ }
2143
+ });
2135
2144
  }
2136
2145
  }
2137
2146
  ngOnDestroy() {