From 86167aa967c777c64344843d8aaf7cf1f7b5b699 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Wed, 15 Jun 2022 11:41:13 +0200 Subject: [PATCH] fix count-input not triggering add-to-cart activation --- src/pretix/static/pretixpresale/js/ui/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pretix/static/pretixpresale/js/ui/main.js b/src/pretix/static/pretixpresale/js/ui/main.js index 72204ba622..75292dae05 100644 --- a/src/pretix/static/pretixpresale/js/ui/main.js +++ b/src/pretix/static/pretixpresale/js/ui/main.js @@ -652,9 +652,10 @@ $(function () { // free-range price input auto-check checkbox $("[data-checked-onchange]").each(function() { - var checkbox = this; + var countInput = this; $("#" + this.getAttribute("data-checked-onchange")).on("change", function() { - checkbox.checked = true; + if (countInput.type === "checkbox") countInput.checked = true; + $(countInput).trigger("change") }); }); });