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

Popup is not preventing overflow when position is set. #4511

Open
c3-danogaram opened this issue Jan 29, 2025 · 1 comment
Open

Popup is not preventing overflow when position is set. #4511

c3-danogaram opened this issue Jan 29, 2025 · 1 comment

Comments

@c3-danogaram
Copy link

c3-danogaram commented Jan 29, 2025

Bug Report

Steps

Configure a tooltip that uses preferred position.
Trigger element should be close to the screen edges.

<Container> <Popup content="This is a laaaaaaarge text" trigger={<Button content="Button" />} on={["click", "hover", "focus"]} position="bottom center" /> </Container>

Expected Result

position value is the preferred position but it should fallback to a position that allows tooltip to be entirely visible in the screen, preventing overflow.

Image

Actual Result

Popup content is cut off on the screen. Overflow prevention is not working and only uses the preferred position

Image

Version

2.1.5

Testcase

https://codesandbox.io/p/sandbox/semantic-ui-react-forked-dqj4g3?file=%2Findex.js%3A3%2C28&workspaceId=ws_N8ra7LbEMp3foJvHk72Qm
[Fork, update, and replace this pen to show the bug]:
https://codesandbox.io/p/sandbox/semantic-ui-react-forked-dqj4g3?file=%2Findex.js%3A3%2C28&workspaceId=ws_N8ra7LbEMp3foJvHk72QmM

Copy link

welcome bot commented Jan 29, 2025

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant