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 9b7e52b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,17 +518,14 @@ 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
nodeType === 'progress' &&
!inputValue) ||
inputValue !== dom[i]
) {
setProperty(dom, i, inputValue, oldProps[i], false);
}
Expand Down

0 comments on commit 9b7e52b

Please sign in to comment.