-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialog unexpectedly renders overlay when it is actually closed #2696
Comments
Hi @pavelkornev, I've checked the example and it's not reproducible. The overlay is rendered with the "hidden" class when the dialog is in a closed state. Please explain in details how to reproduce it. Best regards, |
@Martotko in order to reproduce it, you need just open the provided link. Once you open it — the grey transparent background is an overlay which should not be visible since dialog is not open. Please also try to disable this code in dialog.getStaticAreaItemDomRef().then((overlayRef) => {
overlayRef.addEventListener("click", () => dialog.close());
}); |
Hello @ui5-webcomponents-topic-rd, I am forwarding this issue to you, because the issue is caused by the following code: dialog.getStaticAreaItemDomRef().then((overlayRef) => { The overlay is visible initially with this code in place and everything behind the dialog button is grey. Best regards, |
Describe the bug
While having a Dialog component in closed state, if we trying to get a dom ref of the overlay, the overlay gets rendered (this is fine), but it also becomes unexpectedly visible with a closed dialog at the same time.
Isolated example
https://codesandbox.io/s/ui5-webcomponents-forked-r5wfq?file=/src/index.js
As it shown in this example, I try to get a
staticAreaItemDomRef
via public API:https://github.com/SAP/ui5-webcomponents/blob/master/packages/base/src/UI5Element.js#L896-L901
In order to attach listener on the overlay to close
Dialog
component on click. It's unexpected that overlay is shown when dialog is actually closed.Expected behavior
hidden
attributed should not be removed from the overlay when getting its DOM reference.Screenshots
Affected components
Organization: SAP Graph
Priority: Medium
The text was updated successfully, but these errors were encountered: