Open linkified room aliases and permalinks in the app rather than the browser (#34507)

This commit is contained in:
hayyaksi
2026-08-11 18:31:35 +03:00
committed by GitHub
parent 7897b0c71f
commit 76aeb783b6
2 changed files with 22 additions and 8 deletions
@@ -9,7 +9,6 @@ import React, { type MouseEvent } from "react";
import { MatrixEventEvent, MsgType, type MatrixEvent } from "matrix-js-sdk/src/matrix";
import {
BaseViewModel,
LINKIFIED_DATA_ATTRIBUTE,
TextualBodyViewBodyWrapperKind,
TextualBodyViewKind,
type TextualBodyViewModel as TextualBodyViewModelInterface,
@@ -278,10 +277,6 @@ export class TextualBodyViewModel
public onRootClick = (event: MouseEvent<HTMLDivElement>): void => {
let target: HTMLLinkElement | null = event.target as HTMLLinkElement;
if (target.dataset?.[LINKIFIED_DATA_ATTRIBUTE]) {
return;
}
if (target.nodeName !== "A") {
target = target.closest<HTMLLinkElement>("a");
}