Skip to content

Commit

Permalink
Merge pull request #16714 from TaTo30/xfa-select-storage
Browse files Browse the repository at this point in the history
XFA - Set storage values to select and option elements
  • Loading branch information
Snuffleupagus authored Jul 21, 2023
2 parents d74b68c + 18619ce commit abb24f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/display/xfa_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ class XfaLayer {
break;
case "select":
if (storedData.value !== null) {
html.setAttribute("value", storedData.value);
for (const option of element.children) {
if (option.attributes.value === storedData.value) {
option.attributes.selected = true;
} else if (option.attributes.hasOwnProperty("selected")) {
delete option.attributes.selected;
}
}
}
Expand Down

0 comments on commit abb24f8

Please sign in to comment.