Skip to content

Commit

Permalink
Unbreak in-app permalink tooltips
Browse files Browse the repository at this point in the history
Fixes: element-hq/element-web#22874
Signed-off-by: Johannes Marbach <johannesm@element.io>
  • Loading branch information
Johennes committed Jul 21, 2022
1 parent 81653cf commit 97339ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/tooltipify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ export function tooltipifyLinks(rootNodes: ArrayLike<Element>, ignoredNodes: Ele
const href = node.getAttribute("href");

const tooltip = <LinkWithTooltip tooltip={new URL(href, window.location.href).toString()}>
<span dangerouslySetInnerHTML={{ __html: node.outerHTML }} />
{node.innerHTML}
</LinkWithTooltip>;

ReactDOM.render(tooltip, container);
node.parentNode.replaceChild(container, node);
node.replaceChildren(container);
containers.push(container);
tooltipified = true;
}
Expand Down

0 comments on commit 97339ad

Please sign in to comment.