From 93dcf7e947a3e24167357d3e54af5cef96180a9f Mon Sep 17 00:00:00 2001 From: Olivia206 <olivia.simonet206@gmail.com> Date: Fri, 23 Feb 2024 10:15:46 +0100 Subject: [PATCH] fixed click --- assets/js/theme/blocks/blocksWithGrab.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/js/theme/blocks/blocksWithGrab.js b/assets/js/theme/blocks/blocksWithGrab.js index fc0f094a..143f3629 100644 --- a/assets/js/theme/blocks/blocksWithGrab.js +++ b/assets/js/theme/blocks/blocksWithGrab.js @@ -72,10 +72,6 @@ class BlockWithGrab { this.block.addEventListener('pointerdown', (event) => { this.content.classList.add('is-grabbing'); - this.items.forEach((item) => { - item.style.pointerEvents = "none"; - }); - startX = event.clientX; isPointerDown = true; }); @@ -83,6 +79,12 @@ class BlockWithGrab { this.block.addEventListener('pointermove', (event) => { this.isManipulated = isPointerDown; endX = event.clientX; + + if (this.isManipulated) { + this.items.forEach((item) => { + item.style.pointerEvents = "none"; + }); + } }); endEvents.forEach(event => { -- GitLab