@descope/web-components-ui 1.0.375 → 1.0.376
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/package.json
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
// since on load we can only sample the color of the placeholder,
|
2
2
|
// we need to temporarily populate the input in order to sample the value color
|
3
3
|
const getValueColor = (ele, computedStyle) => {
|
4
|
+
// to support setting dynamic values, we have to store the existing value
|
5
|
+
// and re-set it if we are returning from this hack
|
6
|
+
const origVal = ele.value;
|
7
|
+
|
4
8
|
// eslint-disable-next-line no-param-reassign
|
5
9
|
ele.value = '_';
|
6
10
|
|
7
11
|
const valueColor = computedStyle.getPropertyValue('color');
|
8
12
|
|
9
|
-
|
10
|
-
|
13
|
+
if (ele.value === '_') {
|
14
|
+
// eslint-disable-next-line no-param-reassign
|
15
|
+
ele.value = origVal;
|
16
|
+
}
|
11
17
|
|
12
18
|
return valueColor;
|
13
19
|
};
|