Dialog event listeners experiment
...
Here's a codepen. Since the ::backdrop is not accepting pointer events, I expect clicking on the blue box would be the `event.target`, but it actually ends up being the <HTML> el. I suspect this has something to do <dialog> being moved to the "new" TopLayer in the browser codepen.io/daronspence/...
20.01.2026 22:04
π 2
π 0
π¬ 1
π 0
Oh! I did figure it out! Your example code added the event listener on the body, I assume to make it simple to adapt, but my point is/was that it might be a happy accident. If you wrap the <dialog> in a <div> and add the click outside event listener to that div, I donβt think it will bubble up.
20.01.2026 21:23
π 0
π 0
π¬ 1
π 0
One thing I still did have trouble with was click outside. I'm using Vue & had naively attached the event listener to a parent el in the DOM, but even with pointer events disabled on the ::backdrop, all(?) clicks are proxied to the body & not whatever el was clicked behind the backdrop
20.01.2026 12:16
π 0
π 0
π¬ 1
π 0
I redid out entire cable roll after services this morning. Felt good π
14.09.2025 14:15
π 2
π 0
π¬ 0
π 0
Thanks! My ears are forever in your debt.
18.02.2025 22:28
π 2
π 0
π¬ 1
π 0
I never use this site but I logged on just to plead w/ @coulb.com to check his microphone settings before podcasting π«
Good show though! Glad to have you back β€οΈ
18.02.2025 15:24
π 2
π 0
π¬ 0
π 1
Topped up my half filled coffee cup with tea. That kind of morning!
26.01.2025 09:34
π 0
π 0
π¬ 0
π 0
Sorry, new social media app, who's this? #bluesky #welcome #firstpost
25.11.2024 17:47
π 3
π 0
π¬ 1
π 0