Skip to content

Commit

Permalink
Merge pull request #28951 from ZhenjaHorbach/fix/comment-tag-menu-ite…
Browse files Browse the repository at this point in the history
…m-title

The "Copy URL to clipboard" tooltip does not appear when hovering over a task description link
  • Loading branch information
youssef-lr authored Oct 17, 2023
2 parents 4265b73 + a650f1d commit 62e12c9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,21 @@ const MenuItem = React.forwardRef((props, ref) => {
return;
}
const parser = new ExpensiMark();
setHtml(parser.replace(convertToLTR(props.title)));
setHtml(parser.replace(props.title));
titleRef.current = props.title;
}, [props.title, props.shouldParseTitle]);

const getProcessedTitle = useMemo(() => {
let title = '';
if (props.shouldRenderAsHTML) {
return convertToLTR(props.title);
title = convertToLTR(props.title);
}

if (props.shouldParseTitle) {
return html;
title = html;
}

return '';
return title ? `<comment>${title}</comment>` : '';
}, [props.title, props.shouldRenderAsHTML, props.shouldParseTitle, html]);

const hasPressableRightComponent = props.iconRight || (props.rightComponent && props.shouldShowRightComponent);
Expand Down

0 comments on commit 62e12c9

Please sign in to comment.