diff --git a/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx b/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx index 87d905bc570faf..6be2cc56e50469 100644 --- a/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx +++ b/apps/vr-tests-react-components/src/stories/Tooltip.stories.tsx @@ -79,6 +79,20 @@ storiesOf('Tooltip Converged', module) + )) + .addStory('overflow-wrap', () => ( +
+ + + +
+ )) + .addStory('overflow-wrap withArrow', () => ( +
+ + + +
)); const TooltipPositioning: React.FC = () => { diff --git a/change/@fluentui-react-tooltip-0c7f8278-85ad-44f1-82b3-8048cf63b2e7.json b/change/@fluentui-react-tooltip-0c7f8278-85ad-44f1-82b3-8048cf63b2e7.json new file mode 100644 index 00000000000000..8aec65c3cfbed8 --- /dev/null +++ b/change/@fluentui-react-tooltip-0c7f8278-85ad-44f1-82b3-8048cf63b2e7.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: added overflowWrap to make sure content does not exceed the tooltip container and added vr test for the same", + "packageName": "@fluentui/react-tooltip", + "email": "kakrookaran@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-tooltip/src/components/Tooltip/useTooltipStyles.styles.ts b/packages/react-components/react-tooltip/src/components/Tooltip/useTooltipStyles.styles.ts index 786dba5a2fb40e..7a62104cbc2a20 100644 --- a/packages/react-components/react-tooltip/src/components/Tooltip/useTooltipStyles.styles.ts +++ b/packages/react-components/react-tooltip/src/components/Tooltip/useTooltipStyles.styles.ts @@ -21,6 +21,7 @@ const useStyles = makeStyles({ fontFamily: tokens.fontFamilyBase, fontSize: tokens.fontSizeBase200, lineHeight: tokens.lineHeightBase200, + overflowWrap: 'break-word', ...shorthands.borderRadius(tokens.borderRadiusMedium), ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),