1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[Annotation] A push button can have no action (bug 1778692)

This commit is contained in:
Calixte Denizet 2022-07-08 14:28:32 +02:00
parent b0a3c9e8cf
commit 8f26ba5487
3 changed files with 14 additions and 2 deletions

View file

@ -1440,8 +1440,8 @@ class PushButtonWidgetAnnotationElement extends LinkAnnotationElement {
container.title = this.data.alternativeText;
}
if (this.enableScripting && this.hasJSActions) {
const linkElement = container.lastChild;
const linkElement = container.lastChild;
if (this.enableScripting && this.hasJSActions && linkElement) {
this._setDefaultPropertiesFromJS(linkElement);
linkElement.addEventListener("updatefromsandbox", jsEvent => {