New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid value reported for inputs with name="value"
#2680
Comments
Regression on |
…ramework#2680 `extractMeta` receives a "root element". When this element is an input, we want to retrieve the current value. When the element is a form, `form.key` will look up any inputs in the form with the name "key". If an input has the name "value", then we would retrieve the input element *as the value*, instead of getting the value of an input. We explicitly avoid getting the value of a form to avoid this edgecase. At time of writing, the value attribute is valid on button, data, input, li, meter, option, progress and param tags.
This is caused by serializeForm & extractMeta Serialise form attaches values it receives as "meta" data:
extractMeta grabs the element
|
I'm having the same issue across the app where I have name="value". Going to try the PR above now. |
I have updated the app I work on with @rktjmp PR, and rebuilt the assets and can confirm that indeed it resolves the problem of This is not a livebook app, it's just a form app that uses `input name="value"`` across multiple forms and we have seen them all broken with liveview 0.19 update and this indeed fixes it. To whoever merges this: please do remember to run |
Fixed in 0.19.2 |
@chrismccord I confirm v0.19.2 resolves the issue, thanks! |
When an input has
name="value"
, the value is reported as[object HTMLInputElement]
.Phoenix v1.7.3, LV v0.19.1
Reproduction
The text was updated successfully, but these errors were encountered: