@wistia/ui 1.3.1 → 1.3.2-beta.547940ac.7094a83

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v1.3.1
3
+ * @license @wistia/ui v1.3.2-beta.547940ac.7094a83
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -8891,9 +8891,12 @@ const Input = ({ fullWidth = true, fullHeight = false, monospace = false, type =
8891
8891
  });
8892
8892
  const handleFocus = (event) => {
8893
8893
  if (isNotNil(props.onFocus)) props.onFocus(event);
8894
- if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) requestAnimationFrame(() => {
8895
- ref.current?.select();
8896
- });
8894
+ if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) {
8895
+ const valueOnFocus = ref.current.value;
8896
+ requestAnimationFrame(() => {
8897
+ if (ref.current instanceof HTMLInputElement && ref.current.value === valueOnFocus) ref.current.select();
8898
+ });
8899
+ }
8897
8900
  };
8898
8901
  return /* @__PURE__ */ jsxs(StyledInputContainer, {
8899
8902
  $fullHeight: fullHeight,