Skip to content
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]: Dialog position/width is determined by viewport not by parent element #10593

Open
1 task done
f16r opened this issue Jan 20, 2025 · 3 comments
Open
1 task done
Labels
enhancement New feature or request Medium Prio

Comments

@f16r
Copy link

f16r commented Jan 20, 2025

Bug Description

The Dialog position/width is determined by the viewport and not by its parent element.
In general this is fine but e.g. when the Web Assistant is shown the dialog is partially covered.

Image

While the application adapts to the Web Assistant sidebar (see red box as an example), the dialog is covered.

Affected Component

Dialog

Expected Behaviour

Dialog positioning/width is based on the parent element. (or at least having the option)

Isolated Example

https://sap.github.io/ui5-webcomponents/play/#eyJpbmRleC5odG1sIjp7Im5hbWUiOiJpbmRleC5odG1sIiwiY29udGVudCI6IjwhLS0gcGxheWdyb3VuZC1mb2xkIC0tPlxuPCFET0NUWVBFIGh0bWw-XG5cbjxoZWFkPlxuICAgIFxuICAgIDxzdHlsZT5cbiAgICAgICo6bm90KDpkZWZpbmVkKSB7XG4gICAgICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgICB9XG5cbiAgICBodG1sIHtcbiAgICAgIGZvcmNlZC1jb2xvci1hZGp1c3Q6IG5vbmU7XG4gICAgfVxuICAgIDwvc3R5bGU-XG5cbjwvaGVhZD5cblxuPGJvZHkgc3R5bGU9XCJiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1zYXBCYWNrZ3JvdW5kQ29sb3IpOyBjb2xvcjogdmFyKC0tc2FwVGV4dENvbG9yKTtcIj5cbiAgPCEtLSBwbGF5Z3JvdW5kLWZvbGQtZW5kIC0tPlxuXG4gIDxteS1lbGVtZW50IG5hbWU9XCJVSTUgV2ViIENvbXBvbmVudHNcIj48L215LWVsZW1lbnQ-XG4gIDwhLS0gcGxheWdyb3VuZC1mb2xkIC0tPlxuICA8c2NyaXB0IHR5cGU9XC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Z3JvdW5kLWNvbG9yOiBibHVlXCI-PC9kaXY-XG4gICAgICA8L2Rpdj5cbiAgICApXG4gIH1cbn1cblxuTXlFbGVtZW50LmRlZmluZSgpO1xuIn19

Steps to Reproduce

No response

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

latest

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

CBC

Declaration

  • I’m not disclosing any internal or sensitive information.
@f16r f16r added the bug This issue is a bug in the code label Jan 20, 2025
@didip1000 didip1000 self-assigned this Jan 23, 2025
@didip1000
Copy link
Contributor

Hey @f16r,

In your example, the dialogue covers both the red and blue divs. Could you clarify if this was intentional? Are you expecting that the dialogue should cover only the red rectangle, that it should cover both rectangles, or something else?

Best,
Diana

@didip1000 didip1000 removed their assignment Jan 23, 2025
@f16r
Copy link
Author

f16r commented Jan 23, 2025

Hey @didip1000,
yes, I'd expect that the dialog stays inside the red div.

Best

@didip1000 didip1000 added enhancement New feature or request Medium Prio Kyma and removed bug This issue is a bug in the code author action Kyma labels Jan 23, 2025
@didip1000
Copy link
Contributor

Hey @SAP/ui5-webcomponents-topic-rd,

Can you please take a look at this feature request? The user would like to be able to define where they want the dialog to open.

Best,
DIana

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Medium Prio
Projects
Status: New Issues
Development

No branches or pull requests

2 participants