From 1f012b8bcd6bd4380a266e2cefbd68a6fd262a4a Mon Sep 17 00:00:00 2001 From: hanyd Date: Fri, 13 Sep 2024 12:26:45 +0800 Subject: [PATCH] Fix editing time using wheel changes volume --- src/components/SponsorTimeEditComponent.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 9d85e335..a5f1f83c 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -85,15 +85,9 @@ class SponsorTimeEditComponent extends React.Component { - if (this.state.editing) { - e.preventDefault(); - } - }, - { passive: false } - ); + document + .getElementById("sponsorTimesContainer" + this.idSuffix) + .addEventListener("wheel", (e) => e.preventDefault()); // Add as a config listener if (!this.configUpdateListener) { @@ -359,6 +353,7 @@ class SponsorTimeEditComponent extends React.Component