mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
AcroForm: Add support for ResetForm action
- it aims to fix #12721. - Thanks to PR #14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
This commit is contained in:
parent
db7c91e7b1
commit
aecbd7cd89
7 changed files with 302 additions and 15 deletions
|
@ -476,6 +476,10 @@ class Field extends PDFObject {
|
|||
return false;
|
||||
}
|
||||
|
||||
_reset() {
|
||||
this.value = this.valueAsString = this.defaultValue;
|
||||
}
|
||||
|
||||
_runActions(event) {
|
||||
const eventName = event.name;
|
||||
if (!this._actions.has(eventName)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue