-
Notifications
You must be signed in to change notification settings - Fork 79
[Tooltip]: unexpected placement change of body when it doesn't fit the available space #3016
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Tooltips change their placement from top/bottom to right/left when they don't fit the available space.
Steps to Reproduce
- Place a control with a tooltip with some content (for example, 3-5 words) near the edge of the screen (for example, near the right edge of the screen). Do not set any
placement - Hover over the control (or focus on it using keyboard) for the tooltip to appear and observe its placement
- Move the control far away from the screen's side so that the content of the tooltip could be fully displayed in one line
- Repeat step 2
Actual result
When the content of the tooltip fits the available space, it is displayed above the target and centered on it.
When it doesn't, it is displayed to the left of it, as shown in the screenshot below.

Expected result
When the content of the tooltip fits the available space, it is displayed above the target and centered on it.
When it doesn't, it is still displayed above the target, but the body is shifted to the left a little, as shown in the screenshot below.

Environment
- UUI version: 6.4.1
- Browser name: Google Chrome v.143.0.7499.193
- Operating System: Windows 11 x64
Additional information
- The expected behavior can be achieved when manually setting
placement="top-right", but in this case it will always be displayed like this, even when there is enough available space for the content to be displayed in one line. So it means the previous behavior (before migration to Float UI) is currently lost - Using
shiftmiddleware doesn't help
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Closed