Skip to content

Commit daefaed

Browse files
authored
fix(Tooltip): use ceil for width (#9389)
1 parent 8dfd899 commit daefaed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vkui/src/components/Tooltip/useTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export const useTooltip = ({
175175
customMiddlewares: [
176176
sizeMiddleware({
177177
apply({ rects, elements, availableWidth }) {
178-
const width = Math.min(Math.round(rects.floating.width), Math.floor(availableWidth));
178+
const width = Math.min(Math.ceil(rects.floating.width), Math.floor(availableWidth));
179179
Object.assign(elements.floating.style, {
180180
width: `${width}px`,
181181
});

0 commit comments

Comments
 (0)