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

[JS] UserActivation must be enabled before running document actions

else auto-print is broken (it's a regression from patch #15822).
This commit is contained in:
Calixte Denizet 2023-01-04 19:49:31 +01:00
parent 4faf927030
commit dea2471e96
4 changed files with 31 additions and 0 deletions

View file

@ -91,6 +91,9 @@ class EventDispatcher {
if (id === "doc") {
const eventName = event.name;
if (eventName === "Open") {
// The user has decided to open this pdf, hence we enable
// userActivation.
this.userActivation();
// Initialize named actions before calling formatAll to avoid any
// errors in the case where a formatter is using one of those named
// actions (see #15818).