Skip to content

Commit

Permalink
Always update checked and value when diffing props. (#579)
Browse files Browse the repository at this point in the history
In the case where the old and new vdom have the same value, don't
assume the UI control state has the same value.
  • Loading branch information
dmjio authored Apr 23, 2020
1 parent 41234e4 commit 90efbdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsbits/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ window['diffProps'] = function diffProps(cProps, nProps, node, isSvg) {
node[c] = '';
} else {
/* Already on DOM from previous diff, continue */
if (newProp === cProps[c]) continue;
if (newProp === cProps[c] && c !== 'checked' && c !== 'value') continue;
if (isSvg) {
if (c === 'href')
node.setAttributeNS('http://www.w3.org/1999/xlink', 'href', newProp);
Expand Down

0 comments on commit 90efbdb

Please sign in to comment.