mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #16714 from TaTo30/xfa-select-storage
XFA - Set storage values to select and option elements
This commit is contained in:
commit
abb24f82fb
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue