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

[Bug]: Popover is clipping in a modal #17749

Closed
2 tasks done
georgespano opened this issue Oct 15, 2024 · 2 comments · Fixed by #17840
Closed
2 tasks done

[Bug]: Popover is clipping in a modal #17749

georgespano opened this issue Oct 15, 2024 · 2 comments · Fixed by #17840

Comments

@georgespano
Copy link

Package

@carbon/react

Browser

Chrome

Package version

1.68.0

React version

18.3.1

Description

Opening a popover inside a modal results in the content being clipped. The alignment setting is also not being respected most likely due to the underlying issue causing the clipping.

Image

Using a toggle tip, I do not see the same issue.

Image

Hacky work-around:
On the element with the cds-popover class if you add a css style position: fixed it forces the popover to break out of the clip.
However, it doesn't truly fix the underlying issue and popover positioning based on the parent does not work (ie. align: left).

Reproduction/example

https://stackblitz.com/edit/github-ukeceq?file=src%2FApp.jsx

Steps to reproduce

  1. Open the reproduction example
  2. Click the open modal button
  3. In the modal, click the "Popover" button.

Result: the popover which appears is clipped in the modal - notice the red border which encloses the "I am some content" popover is clipped
Expected: the popover is not clipped.

Notice clicking the toggle tip text shows the same popover as expected (ie. not clipped).

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

Automation Builder Workflow Designer

Code of Conduct

@tay1orjones
Copy link
Member

@preetibansalui do you have any thoughts on why the Toggletip is working correctly in this situation whereas the Popover does not? The HTML between the two does not have much of a diff other than a couple classes and an extra div around the content div in Toggletip.

Image

@preetibansalui preetibansalui self-assigned this Oct 21, 2024
@github-project-automation github-project-automation bot moved this from 🚦 In Review to ✅ Done in Design System Oct 23, 2024
@georgespano
Copy link
Author

Thanks @preetibansalui for fixing this so quickly!
Will this make it into 1.69.0 release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants