@descope/web-components-ui 1.0.375 → 1.0.376

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -1404,13 +1404,19 @@ const inputEventsDispatchingMixin = (superclass) =>
1404
1404
  // since on load we can only sample the color of the placeholder,
1405
1405
  // we need to temporarily populate the input in order to sample the value color
1406
1406
  const getValueColor = (ele, computedStyle) => {
1407
+ // to support setting dynamic values, we have to store the existing value
1408
+ // and re-set it if we are returning from this hack
1409
+ const origVal = ele.value;
1410
+
1407
1411
  // eslint-disable-next-line no-param-reassign
1408
1412
  ele.value = '_';
1409
1413
 
1410
1414
  const valueColor = computedStyle.getPropertyValue('color');
1411
1415
 
1412
- // eslint-disable-next-line no-param-reassign
1413
- ele.value = '';
1416
+ if (ele.value === '_') {
1417
+ // eslint-disable-next-line no-param-reassign
1418
+ ele.value = origVal;
1419
+ }
1414
1420
 
1415
1421
  return valueColor;
1416
1422
  };