From 603ea793f9338febaed655d8dd268ac1a1f1467f Mon Sep 17 00:00:00 2001 From: Lucas Reis Date: Mon, 7 Oct 2024 16:57:26 -0300 Subject: [PATCH] MM-60425 Making clickable images work inside Markdown (#8215) * fix: disables the gallery click on images inside a markdown link * feat: removing the logic for acknowledging children that is inside link * chore: renaming for consistency --- app/components/markdown/markdown.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/markdown/markdown.tsx b/app/components/markdown/markdown.tsx index 0b4dcc6bc..c507797ea 100644 --- a/app/components/markdown/markdown.tsx +++ b/app/components/markdown/markdown.tsx @@ -357,11 +357,15 @@ const Markdown = ({ return null; } + const isInsideLink = context.indexOf('link') !== -1; + + const disableInteraction = (disableGallery ?? Boolean(!location)) || isInsideLink; + if (context.indexOf('table') !== -1) { // We have enough problems rendering images as is, so just render a link inside of a table return (