fix(tooltip) Don't show on small screens (#13113)

pull/13116/head
Robert Pintilii 2 years ago committed by GitHub
parent 1c04a41081
commit ce5f7ba317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      react/features/base/tooltip/components/Tooltip.tsx

@ -58,6 +58,7 @@ const Tooltip = ({ containerClassName, content, children, position = 'top' }: IP
const dispatch = useDispatch();
const [ visible, setVisible ] = useState(false);
const [ isUnmounting, setIsUnmounting ] = useState(false);
const overflowDrawer = useSelector((state: IReduxState) => state['features/toolbox'].overflowDrawer);
const { classes, cx } = useStyles();
const timeoutID = useRef({
open: 0,
@ -69,10 +70,6 @@ const Tooltip = ({ containerClassName, content, children, position = 'top' }: IP
visible: isVisible
} = useSelector((state: IReduxState) => state['features/base/tooltip']);
if (isMobileBrowser()) {
return children;
}
const contentComponent = (
<div
className = { cx(classes.container, previousContent === '' && 'mounting-animation',
@ -133,6 +130,11 @@ const Tooltip = ({ containerClassName, content, children, position = 'top' }: IP
}
}, [ storeContent ]);
if (isMobileBrowser() || overflowDrawer) {
return children;
}
return (
<Popover
allowClick = { true }

Loading…
Cancel
Save