lydell / elm-watch

`elm make` in watch mode. Fast and reliable.
https://lydell.github.io/elm-watch/
MIT License
153 stars 8 forks source link

errors display below <dialog>s #98

Open Mehgugs opened 4 months ago

Mehgugs commented 4 months ago

Recently I've transitioned my modals to use native

elements, but when I encounter errors via elm-watch the in-app error view is below the modal.

Elm's debugger can be popped out to a separate window which solves this problem, perhaps something similar could be done with elm-watch?

lydell commented 4 months ago

Thanks for the report!

I suppose if elm-watch uses a <dialog> too, maybe it wins over your own dialogs?

pete-murphy commented 4 months ago

It seems like <dialog>s opened with .show() will use a stacking context that respects z-index etc., but <dialog>s opened with .showModal() will stack in order that they were opened. And a <dialog> opened with .showModal() will appear above any opened with .show() from what I can tell. https://codepen.io/ptrfrncsmrph-the-vuer/pen/gOJPPor

So if elm-watch uses .showModal(), it would probably win would be my guess 🤷

lydell commented 4 months ago

Cool, thanks for making that demo!

lydell commented 1 month ago

Note to self: Docs here: https://developer.mozilla.org/en-US/docs/Glossary/Top_layer

container.popover = "manual"; container.showPopover() seems to do the trick, and to be the easiest solution.