Fix section toggle firing on filter input drag

Changed header collapse from click to mousedown so dragging from the
filter input to outside no longer triggers a toggle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 19:22:45 +03:00
parent 0b89731d0c
commit dc12452bcd

View File

@@ -95,13 +95,13 @@ export class CardSection {
const filterInput = document.querySelector(`[data-cs-filter="${this.sectionKey}"]`);
if (!header || !content) return;
header.addEventListener('click', (e) => {
header.addEventListener('mousedown', (e) => {
if (e.target.closest('.cs-filter')) return;
this._toggleCollapse(header, content);
});
if (filterInput) {
filterInput.addEventListener('click', (e) => e.stopPropagation());
filterInput.addEventListener('mousedown', (e) => e.stopPropagation());
let timer = null;
filterInput.addEventListener('input', () => {
clearTimeout(timer);