Skip to content

Commit

Permalink
remove fix for select in ie11
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Apr 29, 2024
1 parent 613cacc commit b5225f2
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,17 +518,13 @@ function diffElementNodes(
if (!isHydrating) {
i = 'value';
if (
inputValue !== undefined &&
// #2756 For the <progress>-element the initial value is 0,
// despite the attribute not being present. When the attribute
// is missing the progress bar is treated as indeterminate.
// To fix that we'll always update it when it is 0 for progress elements
(inputValue !== dom[i] ||
(nodeType === 'progress' && !inputValue) ||
// This is only for IE 11 to fix <select> value not being updated.
// To avoid a stale select value we need to set the option.value
// again, which triggers IE11 to re-evaluate the select value
(nodeType === 'option' && inputValue !== oldProps[i]))
(inputValue !== undefined &&
// #2756 For the <progress>-element the initial value is 0,
// despite the attribute not being present. When the attribute
// is missing the progress bar is treated as indeterminate.
// To fix that we'll always update it when it is 0 for progress elements
inputValue !== dom[i]) ||
(nodeType === 'progress' && !inputValue)
) {
setProperty(dom, i, inputValue, oldProps[i], false);
}
Expand Down

0 comments on commit b5225f2

Please sign in to comment.