Closed rviscomi closed 8 years ago
See this jsfiddle: https://jsfiddle.net/cbbpfven/
When an input element already has a value set (in this case, by el.value) updating that value via el.setAttribute doesn't change the displayed value. el.getAttribute returns the updated value, but el.value still shows the old value.
spf.dom.setAttributes is directly affected by this bug: https://github.com/youtube/spfjs/blob/master/src/client/dom/dom.js#L149
This could just be a Chrome bug, but we can work around it by reassigning el.value with the updated value.
See this jsfiddle: https://jsfiddle.net/cbbpfven/
When an input element already has a value set (in this case, by el.value) updating that value via el.setAttribute doesn't change the displayed value. el.getAttribute returns the updated value, but el.value still shows the old value.
spf.dom.setAttributes is directly affected by this bug: https://github.com/youtube/spfjs/blob/master/src/client/dom/dom.js#L149
This could just be a Chrome bug, but we can work around it by reassigning el.value with the updated value.