Skip to content
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

fix: Always apply form elements value property as an attribute #227

Merged
merged 3 commits into from
Jun 6, 2019

Conversation

Robdel12
Copy link
Contributor

@Robdel12 Robdel12 commented Jun 4, 2019

What is this?

Previously, if the value attribute was present in the DOM, we didn't serialize the elements value property to the attribute. There's no reason for us to make this check. it's 100% safe for us to always apply the property value as an attribute on the DOM node.

I also noticed there's a bug with the switch where we didn't have a break on textareas, so we were always adding an invalid value attribute.

Robdel12 added 2 commits June 3, 2019 17:55
There's no reason for us to check to see if the value attribute exists on a DOM
node already. This was probably a check to prevent us from modifying the
customers DOM when we were mutating in place. Now we're only modifying the
clone, so it's safe to _always_ set the attribute from the DOM elements
property.
@Robdel12 Robdel12 requested a review from djones June 4, 2019 16:27
@djones
Copy link
Contributor

djones commented Jun 4, 2019

@blake-newman would you be able to confirm this fixes your use case?

@blake-newman
Copy link
Contributor

@djones yes I can no problem, can't right now as our ci infrastructure turns off during OOO hours. So will have report back to you for your morning

@blake-newman
Copy link
Contributor

Can confirm this works 👍

Copy link
Contributor

@djones djones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍍 LGTM

@Robdel12 Robdel12 merged commit 8bcc318 into master Jun 6, 2019
@delete-merged-branch delete-merged-branch bot deleted the rd/failing-attr-test branch June 6, 2019 13:40
djones pushed a commit that referenced this pull request Jun 6, 2019
## [0.5.3](v0.5.2...v0.5.3) (2019-06-06)

### Bug Fixes

* Always apply form elements value property as an attribute ([#227](#227)) ([8bcc318](8bcc318))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants