From 9c8718afac82390913fbff1fbf827ec1e787e2f7 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 26 Jan 2024 17:17:08 +0100 Subject: [PATCH] fix scroll and click on chromium based browser --- templates/portfolio/card.html | 6 +++++- templates/portfolio/index.html | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/templates/portfolio/card.html b/templates/portfolio/card.html index e0b0a82..bc1d51d 100644 --- a/templates/portfolio/card.html +++ b/templates/portfolio/card.html @@ -1,5 +1,9 @@ {{#metadata}} {{#info}} {{#portfolio}} {{#link}} -
  • +
  • {{>portfolio/project.html}}
  • {{/link}} {{^link}} diff --git a/templates/portfolio/index.html b/templates/portfolio/index.html index 4a3e6fb..596aecd 100644 --- a/templates/portfolio/index.html +++ b/templates/portfolio/index.html @@ -42,6 +42,13 @@ }) ); + /* Middle click */ + const disableScroll = () => { + if (event.button === 1) { + event.preventDefault(); + } + }; + /* Open cards link */ const openLink = (url) => { const backgroundtab = () => @@ -62,12 +69,12 @@ window.open(url, "_blank", "noreferrer"); } break; + case 1: /* Middle click */ - event.preventDefault(); backgroundtab(); - break; + default: break; }