Undocumented change in dialog / background in rc8
Describe the bug
When a dialog is opened there is an "opaque background" (it probably has a better name) below the dialog to mask the screen and highlight the dialog.
It seems like the markup changed in rc8 causing problems in my application - the opaque background is now rendered on top of the dialog preventing any interaction with the inputs of the dialog.
To reproduce
My dialog parent element has a z-index of 0 - I have no control over this.
The background is now rendered rendered has a first child of the body with a z-index of 101.
Even though the z-index of the dialog is 102 it is rendered below the background because it's parent has a z-index of 0.
Isolated example
I can not reproduce on CodeSandBox.
The static area that is the first child of my app body:
<ui5-static-area>
<ui5-static-area-item class="ui5wc_57">
</ui5-static-area-item>
</ui5-static-area>
does not get created on CodePen.
If you have an idea when the static area gets created I could try to reproduce.
Expected behavior
The dialog should be rendered on top of the background
Screenshots

Context
- UI5 Web Components version rc7 vs rc8
- OS/Platform: MacOS
- Browser (if relevant): Chrome 84.0.4147.105
Hello @vicb
Could you create an isolated example by forking this CodeSandBox sample. (Probably you have tried to create the isolated example with older version of UI5 Web Components, when the static area has not been implemented yet)
Best regards, Filip
@fifoosid I actually updated ui5 to RC8 but wasn't able to reproduce.
I investigated a bit and figured out that z-index handling depends on a lot of factors. See MDN about the stacking context
In the end I was able to reproduce on CodeSandBox by adding the position: relative style to the enclosing div.
See https://codesandbox.io/s/ui5-webcomponents-forked-ghwsc?file=/index.html
Thanks for your quick reply.
Edit: There is something strange. If I open the link to the CodeSandBox the dialog works fine. But you can reproduce with the following steps:
- Navigate to the link, open the dialog, it should work as expected,
- Edit the html,
- You should see an error "NotFoundError Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node."
- Close the error,
- Try to open the dialog now and you should see the "bug" (i.e. dialog behind the background).
Let me know if you can reproduce that.
Hello @vicb thanks for your efforts to make a sample to reproduce the issue. I could not reproduce it in the codesandbox with the provided steps. But, reading the issue description and having the dialog inside a parent with z-index="0" can lead to this bug for sure. For the moment, we can just recommend rendering it outside that div, move it to somewhere else.
Thanks for the understanding, ilhan
@ilhan007 sure there are plenty of way to workaround using 20190 style JS. But we are in 2020 in I like to have my components encapsulated in WC.
One reason why I use libraries is that I expected them to handle the nasty details.
I can understand that's fixing this is not on your priority list. However the change in behavior should be properly documented IMO.
Thanks for your web components, good work.
First of all I could not reproduce it with the codesandbox sample. If you provide us a url with RC.7 and your setup - working and with RC.8 and the same setup - not working, we will look what has been changed according to our priority.
Second, we recommend using dialogs, popovers at top level to avoid such "nasty details".
Third, there is nothing to document, besides the above mentioned recommendation. It is not expected to have the darken background over the dialog.
And last, use whatever workaround you can. If there is a library that has no limitations and everything is done for you, please go ahead and use it.
Thanks for the feedback, good work.
If you provide us a url with RC.7 and your setup - working and with RC.8 and the same setup - not working, we will look what has been changed according to our priority.
You should have told that instead of closing the issue maybe ? My understanding of you closing the issue is that you are not interested in this report.
Third, there is nothing to document, besides the above mentioned recommendation. It is not expected to have the darken background over the dialog.
I think such changes should be documented in the release notes.
If there is a library that has no limitations and everything is done for you, please go ahead and use it.
Sure that's what I'm going to do if at some point sticking with rc7 becomes a problem. My project is small and use only a few ui5 components. This does not prevent me from reporting issues with projects that I use. I think it is helpful for maintainers and for other users.