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/...
Posts by Daron
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.
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
@aleksandrhovhannisyan.com thanks for the write up on dialogs! Came in handy today :)
www.aleksandrhovhannisyan.com/blog/how-to-...
I redid out entire cable roll after services this morning. Felt good π
Thanks! My ears are forever in your debt.
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 β€οΈ
Topped up my half filled coffee cup with tea. That kind of morning!
Sorry, new social media app, who's this? #bluesky #welcome #firstpost