From 19805feb9754e08734a5d85dce6c52b54eaa41c3 Mon Sep 17 00:00:00 2001 From: Wx-2025 <351320169@qq.com> Date: Thu, 30 Oct 2025 16:45:18 +0800 Subject: [PATCH] Update bindings.js --- ui/bindings.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/bindings.js b/ui/bindings.js index e413231..d93c85b 100644 --- a/ui/bindings.js +++ b/ui/bindings.js @@ -427,8 +427,19 @@ export function bindModalEvents() { const container = $("#amily2_drawer_content").length ? $("#amily2_drawer_content") : $("#amily2_chat_optimiser"); // Collapsible sections logic - container.on('click', '.collapsible-legend', function() { + container.on('click touchend', '.collapsible-legend', function(e) { + e.preventDefault(); + e.stopPropagation(); + const legend = $(this); + // Debounce to prevent double firing on touch devices + const now = Date.now(); + const lastTouch = legend.data('lastTouch') || 0; + if (now - lastTouch < 500) { + return; + } + legend.data('lastTouch', now); + const content = legend.siblings('.collapsible-content'); const icon = legend.find('.collapse-icon');