dialog
elementNavigation menu errors are common, even for seasoned developers. Learn seven common navigation menu errors and how to solve them using CSS.
Compare the top React toast libraries for when it’s more trouble than it’s worth to create your own custom toast components.
TanStack Start vs. Next.js: both are powerful full-stack React frameworks, but they take fundamentally different approaches to architecture, routing, and developer experience. This guide breaks down their core features from SSR and data fetching to TypeScript support and deployment, to help you choose the right tool for your next React project.
While it may seem like a maintenance update, Angular v20 is packed with practical, production-ready upgrades that will enable us to build apps faster and with more confidence.
3 Replies to "Why you should be using the <code>dialog</code> element"
it’s still not nearly supported enough to use in production, check caniuse – 76%
Hey Karol,
By using it in the production I meant the dialog element is supported by all the modern browsers except a few obscure browsers, such as IE, Opera Mini, KaiOS browser, UC browser etc, that still doesn’t support the dialog element.
The market share of these browsers is fairly low at this point. And that’s why I said it’s safe to use it in the production.
You can use another way that is much simpler for detecting outside click:
“`
const listener = (event: Event) => {
if (
event.target !== collectEmail &&
event.composedPath().includes(collectEmail)
) {
return;
}
// clicked outside the `collectEmail `
};
“`
You’re welcome 🙂