@descope/web-components-ui 1.0.375 → 1.0.377

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
  };