From f814f8e2eddf8fab97a63ef4fd373fdda48aaaf0 Mon Sep 17 00:00:00 2001 From: HichamELBSI Date: Mon, 7 Dec 2020 17:17:49 +0100 Subject: [PATCH] Fix updatePosition uncaught error Signed-off-by: HichamELBSI --- .../RelationPreviewList/RelationPreviewTooltip.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/strapi-plugin-content-manager/admin/src/components/RelationPreviewList/RelationPreviewTooltip.js b/packages/strapi-plugin-content-manager/admin/src/components/RelationPreviewList/RelationPreviewTooltip.js index 5db20917c1..333e546249 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/RelationPreviewList/RelationPreviewTooltip.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/RelationPreviewList/RelationPreviewTooltip.js @@ -56,7 +56,13 @@ const RelationPreviewTooltip = ({ tooltipId, rowId, mainField, name }) => { // Used to update the position after the loader useLayoutEffect(() => { if (!isLoading && tooltipRef.current) { - tooltipRef.current.updatePosition(); + // A react-tooltip uncaught error is triggered when updatePosition is called in firefox. + // https://github.com/wwayne/react-tooltip/issues/619 + try { + tooltipRef.current.updatePosition(); + } catch (err) { + console.log(err); + } } }, [isLoading]);