ui5-webcomponents
ui5-webcomponents copied to clipboard
[Dialog, ResponsivePopover]: block-layer remains on top if second Dialog is being opened from inside the first Dialog
Bug Description
The block-layer displayed by a dialog remains on top of a second Dialog or ResponsivePopover popover on mobile, opened from inside the first Fialog.
Affected Component
Dialog, ResponsivePopover
Expected Behaviour
The ResponsivePopover the Dialog that are opened second should not be cover by the block layer.
Isolated Example
No response
Steps to Reproduce
-
Checkout the
release-1.24branch (you probably need to clean it as it diverges too much, rm -rf node_modules, yarn, yarn clean, yarn build) -
Start the development server, open the test/Dialog.html and replace the body with this:
<body>
<ui5-button id="dialogOpener">Open Dialog</ui5-button>
<ui5-dialog id="dialog">
<ui5-button id="dialogOpener2">Open ResponsivePopover</ui5-button>
<ui5-dialog id="dialog2" opener="popupOpener" header-text="Newsletter subscription">
<div className="popover-content">
Lorem ipsum
</div>
<div slot="footer" className="popover-footer">
<ui5-button id="closePopoverButton" design="Emphasized">Subscribe</ui5-button>
</div>
</ui5-dialog>
</ui5-dialog>
<script>
const dialogOpener = document.getElementById("dialogOpener");
const dialogOpener2 = document.getElementById("dialogOpener2");
const dialog = document.getElementById("dialog");
const popover = document.getElementById("popover");
dialogOpener2.addEventListener("click", () => {
dialog2.open = true;
});
dialogOpener.addEventListener("click", () => {
dialog.open = true;
});
</script>
</body>
- Open the first dialog
- Open the second dialog
- Observe the result ...
Log Output, Stack Trace or Screenshots
Priority
None
UI5 Web Components Version
1.24 (release-1.24)
Browser
Chrome
Operating System
No response
Additional Context
No response
Organization
No response
Declaration
- [X] I’m not disclosing any internal or sensitive information.
Hello @SAP/ui5-webcomponents-topic-rd could you see this issues the block layer visibility isn't handled. The issue seems familiar, it's possible that we have fixed it along the way. The good thing is that the issue is not reproducible with 2.0. But still, 1.24 is our 6months maintenance version and we need to fix this.
Nesting ui5-dialog inside other ui5-dialog was not feasible before the release of WebC version 2.0, which adopts the Popover API.
Dialogs and block layers z-indexes are correctly calculated in this case, but the second dialog is inside the first dialog, which has its own stacking context.
Here the dialog should be placed one after another:
<ui5-dialog id="dialog">
<ui5-button id="dialogOpener2">Open ResponsivePopover</ui5-button>
</ui5-dialog>
<ui5-dialog id="dialog2" opener="popupOpener" header-text="Newsletter subscription">
<div className="popover-content">
Lorem ipsum
</div>
<div slot="footer" className="popover-footer">
<ui5-button id="closePopoverButton" design="Emphasized">Subscribe</ui5-button>
</div>
</ui5-dialog>