Unbreak in-app permalink tooltips (#9087)
* Unbreak in-app permalink tooltips Fixes: vector-im/element-web#22874 Signed-off-by: Johannes Marbach <johannesm@element.io> * Appease the linter * Fix the tests
This commit is contained in:
parent
60696d78ca
commit
e28fd8651e
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue