From aee27836d66b17916a14830e744da8ed66739d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 28 Sep 2021 07:53:52 +0200 Subject: [PATCH] Use click not onclick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/linkify-matrix.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/linkify-matrix.ts b/src/linkify-matrix.ts index 57cc3939b8..20f1b1e213 100644 --- a/src/linkify-matrix.ts +++ b/src/linkify-matrix.ts @@ -211,7 +211,8 @@ matrixLinkify.options = { const permalink = parsePermalink(href); if (permalink && permalink.userId) { return { - onclick: function(e) { + // @ts-ignore see https://linkify.js.org/docs/options.html + click: function(e) { matrixLinkify.onUserClick(e, permalink.userId); }, }; @@ -223,19 +224,22 @@ matrixLinkify.options = { } case Type.UserId: return { - onclick: function(e) { + // @ts-ignore see https://linkify.js.org/docs/options.html + click: function(e) { matrixLinkify.onUserClick(e, href); }, }; case Type.RoomAlias: return { - onclick: function(e) { + // @ts-ignore see https://linkify.js.org/docs/options.html + click: function(e) { matrixLinkify.onAliasClick(e, href); }, }; case Type.GroupId: return { - onclick: function(e) { + // @ts-ignore see https://linkify.js.org/docs/options.html + click: function(e) { matrixLinkify.onGroupClick(e, href); }, };