Skip to content

Commit 0492413

Browse files
authored
Update fast-search-card.js
1 parent f2061fb commit 0492413

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

dist/fast-search-card.js

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11641,10 +11641,14 @@ class FastSearchCard extends HTMLElement {
1164111641
otherArrow.style.transform = 'rotate(0deg)';
1164211642
});
1164311643

11644-
// Tab-spezifische Initialisierung wenn geöffnet
11644+
// Aktuelles Toggle (nur öffnen wenn es geschlossen war)
1164511645
if (!isOpen) {
11646-
// Kurz warten bis DOM ready ist
11647-
setTimeout(() => {
11646+
content.classList.add('open');
11647+
header.classList.add('active');
11648+
arrow.style.transform = 'rotate(45deg)';
11649+
11650+
// NACH dem DOM-Update initialisieren
11651+
requestAnimationFrame(() => {
1164811652
switch(accordionType) {
1164911653
case 'timer':
1165011654
this.initializeTimerTab(item, content);
@@ -11656,18 +11660,26 @@ class FastSearchCard extends HTMLElement {
1165611660
this.initializeActionsTab(item, content);
1165711661
break;
1165811662
}
11659-
}, 50);
11663+
});
1166011664
}
1166111665
});
1166211666
});
11663-
11664-
// Initial Timer Tab aktivieren
11665-
const timerContent = this.shadowRoot.querySelector('[data-shortcuts-content="timer"]');
11666-
if (timerContent) {
11667-
this.initializeTimerTab(item, timerContent);
11667+
11668+
// Initial Timer Accordion öffnen und initialisieren
11669+
const firstAccordionHeader = this.shadowRoot.querySelector('.accordion-header[data-accordion="timer"]');
11670+
const firstAccordionContent = this.shadowRoot.querySelector('[data-content="timer"]');
11671+
if (firstAccordionHeader && firstAccordionContent) {
11672+
firstAccordionHeader.classList.add('active');
11673+
firstAccordionContent.classList.add('open');
11674+
const arrow = firstAccordionHeader.querySelector('.accordion-arrow svg');
11675+
if (arrow) arrow.style.transform = 'rotate(45deg)';
11676+
11677+
requestAnimationFrame(() => {
11678+
this.initializeTimerTab(item, firstAccordionContent);
11679+
});
1166811680
}
1166911681
}, 100);
11670-
}
11682+
}
1167111683

1167211684
// ✅ Aktionen Tab Initialisierung
1167311685
initializeActionsTab(item, container) {

0 commit comments

Comments
 (0)