From 5f621e1a3fe40d9e7283b1befa65046abb1e1ab4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 10 Sep 2025 19:26:47 -0400 Subject: [PATCH] index.html.in: make ticket taps do nothing Tapping the ticket (anything but the QR code) in CharmPass does nothing; i.e. it does not change the background from day to night. We mimic that with a dummy click handler on the ticket. --- index.html.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.html.in b/index.html.in index 3fe1294..3d02440 100644 --- a/index.html.in +++ b/index.html.in @@ -1158,6 +1158,15 @@ /* Focus (grow) or unfocus (ungrow) the QR code */ document.getElementById("qr").addEventListener("click", toggle_qr_focus); + + /* Dummy handler to prevent taps on the ticket from + * swapping day and night. Events bubble "up" by default + * so, even though the QR code is part of the ticket, + * taps on the QR should still be handled. */ + document.getElementById("ticket").addEventListener( + "click", + event => { event.stopPropagation(); } + ); } else { /* If we haven't submitted the form yet, set up change handlers -- 2.49.0