Bug 1685313 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

OK, I'm having some issues with getting HTML `dialog`s to reliably show up. To see what I mean, if I run:

```
let x = document.createElement("dialog");
x.append("Hello this is a test");
document.body.insertBefore(x, document.getElementById("mainPopupSet"));
x.showModal();
```

This doesn't visually change the window, but if you try and click anywhere, it won't do anything. So the dialog is preventing input to the window (good!), but it's not being painted (not so good). Looking at the browser toolbox, the dialog has layout and width and height and visibility is `visible`, opacity is 1, and I can't for the life of me work out why nothing is showing up. I tried messing with z-index, or using `visibility: hidden` on the other items in the window, but nothing appears to help.

Kicker: if you right click the dialog node in the browser toolbox inspector and click "duplicate node", the duplicate shows up in the browser window (but not in the toolbox, confusingly - at least until you restart the toolbox).

I think this might be to do with `display: fixed` and XUL layout or something? But it's kind of hard to tell from frontend code.

Olli/Emilio, can you help me get unstuck?

(because of the toolbox messing showing a dialog, I actually worked out a reasonable amount of code to get this approach to work with SubDialog.jsm and other code we already have, so I'm hoping I'm actually close to a solution here - but obviously I have no idea how difficult it is to resolve this issue...)
OK, I'm having some issues with getting HTML `dialog`s to reliably show up. To see what I mean, if I run:

```
let x = document.createElement("dialog");
x.append("Hello this is a test");
document.body.insertBefore(x, document.getElementById("mainPopupSet"));
x.showModal();
```

in the browser console, this doesn't visually change the window, but if you try and click anywhere, it won't do anything. So the dialog is preventing input to the window (good!), but it's not being painted (not so good). Looking at the browser toolbox, the dialog has layout and width and height and visibility is `visible`, opacity is 1, and I can't for the life of me work out why nothing is showing up. I tried messing with z-index, or using `visibility: hidden` on the other items in the window, but nothing appears to help.

Kicker: if you right click the dialog node in the browser toolbox inspector and click "duplicate node", the duplicate shows up in the browser window (but not in the toolbox, confusingly - at least until you restart the toolbox).

I think this might be to do with `display: fixed` and XUL layout or something? But it's kind of hard to tell from frontend code.

Olli/Emilio, can you help me get unstuck?

(because of the toolbox messing showing a dialog, I actually worked out a reasonable amount of code to get this approach to work with SubDialog.jsm and other code we already have, so I'm hoping I'm actually close to a solution here - but obviously I have no idea how difficult it is to resolve this issue...)

Back to Bug 1685313 Comment 4