Skip to content

Commit

Permalink
Merge pull request #16704 from s77rt/tooltip-text-width-calculation
Browse files Browse the repository at this point in the history
Tooltip: Render text freely for measurement
  • Loading branch information
flodnv authored Mar 30, 2023
2 parents 7f036df + aab0765 commit 2398744
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/styles/getTooltipStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ export default function getTooltipStyles(
fontSize: tooltipFontSize,
overflow: 'hidden',
lineHeight: variables.lineHeightSmall,

// To measure tooltip text width correctly we render it freely i.e. text should not wrap to parent's boundaries.
// More info: https://github.com/Expensify/App/issues/15949#issuecomment-1483011998
...(tooltipContentWidth ? {} : styles.pre),
},
pointerWrapperStyle: {
position: 'fixed',
Expand Down

0 comments on commit 2398744

Please sign in to comment.