diff --git a/plugin/src/App/Components/Tooltip.lua b/plugin/src/App/Components/Tooltip.lua index 588579c4b..25423e8ca 100644 --- a/plugin/src/App/Components/Tooltip.lua +++ b/plugin/src/App/Components/Tooltip.lua @@ -23,7 +23,7 @@ local TooltipContext = Roact.createContext({}) local function Popup(props) return Theme.with(function(theme) - local textXSpace = math.min(props.parentSize.X, 250) + local textXSpace = math.min(props.parentSize.X, 250) - TEXT_PADDING.X local textBounds = getTextBoundsAsync(props.Text, theme.Font.Main, theme.TextSize.Medium, textXSpace) local contentSize = textBounds + TEXT_PADDING + (Vector2.one * 2) @@ -36,7 +36,7 @@ local function Popup(props) -- If there's not enough space below, and there's more space above, then show the tooltip above the trigger local displayAbove = spaceBelow < contentSize.Y and spaceAbove > spaceBelow - local X = math.clamp(props.Position.X - X_OFFSET, 0, props.parentSize.X - contentSize.X) + local X = math.clamp(props.Position.X - X_OFFSET, 0, math.max(props.parentSize.X - contentSize.X, 1)) local Y = 0 if displayAbove then