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:
@@ -95,13 +95,13 @@ export class CardSection {
|
|||||||
const filterInput = document.querySelector(`[data-cs-filter="${this.sectionKey}"]`);
|
const filterInput = document.querySelector(`[data-cs-filter="${this.sectionKey}"]`);
|
||||||
if (!header || !content) return;
|
if (!header || !content) return;
|
||||||
|
|
||||||
header.addEventListener('click', (e) => {
|
header.addEventListener('mousedown', (e) => {
|
||||||
if (e.target.closest('.cs-filter')) return;
|
if (e.target.closest('.cs-filter')) return;
|
||||||
this._toggleCollapse(header, content);
|
this._toggleCollapse(header, content);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (filterInput) {
|
if (filterInput) {
|
||||||
filterInput.addEventListener('click', (e) => e.stopPropagation());
|
filterInput.addEventListener('mousedown', (e) => e.stopPropagation());
|
||||||
let timer = null;
|
let timer = null;
|
||||||
filterInput.addEventListener('input', () => {
|
filterInput.addEventListener('input', () => {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
|||||||
Reference in New Issue
Block a user