diff --git a/iron-form.html b/iron-form.html index f6227a0..4c1c241 100644 --- a/iron-form.html +++ b/iron-form.html @@ -452,6 +452,18 @@ el.checked = this._customElementsInitialValues[i]; } else { el.value = this._customElementsInitialValues[i]; + + // In the shady DOM, the native form is all-seeing, and will + // reset the nested inputs inside and . + // In particular, it resets them to what it thinks the default value + // is (i.e. "", before the bindings have ran), and since this is + // a programmatic update, it also doesn't fire any events. + // Which means we need to manually update the native element's value. + if (el.inputElement) { + el.inputElement.value = el.value; + } else if (el.textarea) { + el.textarea.value = el.value; + } } el.invalid = false; } diff --git a/test/basic.html b/test/basic.html index 0dbf5ce..c0f5f42 100644 --- a/test/basic.html +++ b/test/basic.html @@ -16,6 +16,8 @@ + + @@ -130,6 +132,8 @@