@descope/web-components-ui 1.0.375 → 1.0.377

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.
@@ -2625,13 +2625,19 @@ const inputEventsDispatchingMixin = (superclass) =>
2625
2625
  // since on load we can only sample the color of the placeholder,
2626
2626
  // we need to temporarily populate the input in order to sample the value color
2627
2627
  const getValueColor = (ele, computedStyle) => {
2628
+ // to support setting dynamic values, we have to store the existing value
2629
+ // and re-set it if we are returning from this hack
2630
+ const origVal = ele.value;
2631
+
2628
2632
  // eslint-disable-next-line no-param-reassign
2629
2633
  ele.value = '_';
2630
2634
 
2631
2635
  const valueColor = computedStyle.getPropertyValue('color');
2632
2636
 
2633
- // eslint-disable-next-line no-param-reassign
2634
- ele.value = '';
2637
+ if (ele.value === '_') {
2638
+ // eslint-disable-next-line no-param-reassign
2639
+ ele.value = origVal;
2640
+ }
2635
2641
 
2636
2642
  return valueColor;
2637
2643
  };