The code below works well on Chromium and Webkit, but on Firefox.
page.on('dialog', dialog => {
dialog.dismiss().catch(() => {})
})
Is there another way to dismiss dialogs on Firefox?
Update:
An example repo which reproduces this error: https://github.com/saltyshiomix/playwright-issue-4546
It seems that Firefox can't handle the second dialog which includes the additional text Prevent this page from creating additional dialogs.

It works perfectly both of Chromium and Webkit 👍
Environment
0.162.011.0.1(20B29)Could you please provide a page url, or a snippet that reproduces the issue?
Also, could you please provide Playwright version and OS version?
Thank you for your reply, @dgozman !
I edited the description of this issue.
By the way, I proudly believe the playwright saves the E2E world so I'm ready to contribute to around the playwright at anytime :)
Thank you for your kind words! I can repro this, we'll fix it soon.
Most helpful comment
Thank you for your kind words! I can repro this, we'll fix it soon.