Advertisement Β· 728 Γ— 90

Posts by Daron

Preview
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/...

3 months ago 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.

3 months ago 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

3 months ago 0 0 1 0
How to Open and Close HTML Dialogs | Aleksandr Hovhannisyan Learn how to use the show(), showModal(), and close() methods to toggle an HTML dialog's visibility.

@aleksandrhovhannisyan.com thanks for the write up on dialogs! Came in handy today :)

www.aleksandrhovhannisyan.com/blog/how-to-...

3 months ago 1 0 1 0

I redid out entire cable roll after services this morning. Felt good πŸ˜…

7 months ago 2 0 0 0

Thanks! My ears are forever in your debt.

1 year ago 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 ❀️

1 year ago 2 0 0 1
Advertisement

Topped up my half filled coffee cup with tea. That kind of morning!

1 year ago 0 0 0 0

Sorry, new social media app, who's this? #bluesky #welcome #firstpost

1 year ago 3 0 1 0