@descope/web-components-ui 3.16.2 → 3.16.4

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.
@@ -29010,8 +29010,17 @@ class RawHybridField extends BaseClass$2 {
29010
29010
 
29011
29011
  setActiveInputSelectionStart() {
29012
29012
  setTimeout(() => {
29013
- this.activeInputEle.focus();
29014
- this.activeInputEle.setSelectionRange?.(this.#selectionStart, this.#selectionStart);
29013
+ const ele = this.activeInputEle;
29014
+ ele.focus();
29015
+ // setSelectionRange throws InvalidStateError on input types that do not
29016
+ // support selection (e.g. `email`). The focus handler usually switches
29017
+ // type to `text` first, but that can race with the blur timer or fail
29018
+ // to fire (e.g. background tab). Restoring the caret is best-effort.
29019
+ try {
29020
+ ele.setSelectionRange?.(this.#selectionStart, this.#selectionStart);
29021
+ } catch {
29022
+ /* noop */
29023
+ }
29015
29024
  });
29016
29025
  }
29017
29026