Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For some reason the regular popup works without asking for my permission, whereas the delayed one gets blocked by Firefox (86.0.1 on Windows 10)


This will happen in most browsers (I’m on Safari 14, macOS 11.2). The popup-blockers in most browsers will allow a popup if it is opened directly because of user input, such as a button click — a fairly simple measure which can be implemented by only allowing certain APIs to work within an event handler, for example.

There are a few Web APIs which work this way — for example, you can’t make a page fullscreen unless you do so in response to user input/interaction [0].

[0]: https://developer.mozilla.org/en-US/docs/Web/API/Element/req...


Popups triggered by a user are considered trusted and are usually allowed

https://developer.mozilla.org/en-US/docs/Web/API/Event/isTru...


That's intentional. Instant popups from clicks can have totally legitimate uses (like logging into sites like Disqus/Paypal etc on external sites).

Delayed popups have very few, if any, legitimate uses.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: