@farm.js/react 0.1.0-beta.30 → 0.1.0-beta.31
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.
|
@@ -1731,6 +1731,9 @@ function updateAttribute(element, name, value) {
|
|
|
1731
1731
|
if (name === "value" && (isInputElement(element) || isTextAreaElement(element))) {
|
|
1732
1732
|
const nextValue = value === null || value === void 0 ? "" : String(value);
|
|
1733
1733
|
if (element.value !== nextValue) element.value = nextValue;
|
|
1734
|
+
if (value != null && isInputElement(element) && (element.type !== "number" || element.ownerDocument.activeElement !== element) && element.defaultValue !== nextValue) {
|
|
1735
|
+
element.defaultValue = nextValue;
|
|
1736
|
+
}
|
|
1734
1737
|
return;
|
|
1735
1738
|
}
|
|
1736
1739
|
if (name === "value" && isSelectElement(element)) {
|