8000 Fix FloatingUI elements position when used scaling by AyIong · Pull Request #188 · tgstation/tgui-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix FloatingUI elements position when used scaling #188

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

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

AyIong
Copy link
Collaborator
@AyIong AyIong commented Jun 12, 2025

About the PR

Added position: relative to body element, which have scale property when it needs
It fixes miss positioned tooltips, dropdowns etc.
Fix src - floating-ui/floating-ui#3032 (comment)
Fixes #178

Before

Y57csSpbv1.mp4

After

coaFvihYei.mp4

Also floating elements now created inside container with id tgui-root which must be before Layout component
If document has no element with id tgui-root, floating will create it on bottom of body

Why's this needed?

Fixing scaling issue and geting rid of floating in body (if you add tgui-root id)

@AyIong AyIong changed the title Fix FLoatingUI elements position when used scaling Fix FloatingUI elements position when used scaling Jun 12, 2025
@ZephyrTFA ZephyrTFA merged commit d90b8fa into tgstation:main Jun 12, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

Tooltip placement Issues on buttons
2 participants
0