diff --git a/src/platform/web/ui/session/room/timeline/ImageView.js b/src/platform/web/ui/session/room/timeline/ImageView.js index 06d479f3..fb540f4b 100644 --- a/src/platform/web/ui/session/room/timeline/ImageView.js +++ b/src/platform/web/ui/session/room/timeline/ImageView.js @@ -27,12 +27,10 @@ export class ImageView extends TemplateView { width: vm.thumbnailWidth, height: vm.thumbnailHeight, loading: "lazy", - alt: vm.label, + alt: vm => vm.label, + title: vm => vm.label, }); const linkContainer = t.a({ - href: "#", - onClick: evt => this.openImage(evt), - target: "_blank", style: `padding-top: ${heightRatioPercent}%; width: ${vm.thumbnailWidth}px;` }, image); @@ -40,14 +38,4 @@ export class ImageView extends TemplateView { [t.div(linkContainer), t.p(t.time(vm.date + " " + vm.time))] ); } - - async openImage(evt) { - const link = evt.currentTarget; - if (link.getAttribute("href") === "#") { - evt.preventDefault(); - const url = await this.value.loadImageUrl(); - link.setAttribute("href", url); - link.click(); - } - } }