Skip to content

Commit

Permalink
Merge pull request #392 from vivliostyle/fix/allow-dialog-in-preview
Browse files Browse the repository at this point in the history
fix: prevent confirm dialog from being auto-dismissed
  • Loading branch information
MurakamiShinyu authored Apr 1, 2023
2 parents 7de79be + dd61be8 commit 37c1673
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ export async function preview(cliFlags: PreviewCliFlags) {
`window.localStorage.setItem('i18nextLng', '${locale}');`,
);

// Prevent confirm dialog from being auto-dismissed
page.on('dialog', () => {});

await page.goto(viewerFullUrl);

// Move focus from the address bar to the page
Expand Down

0 comments on commit 37c1673

Please sign in to comment.