File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4206,6 +4206,24 @@ class FastSearchCard extends HTMLElement {
42064206 }
42074207 }
42084208 });
4209+
4210+ // NEU: Search-Wrapper Klick Event hinzufügen
4211+ const searchWrapper = this.shadowRoot.querySelector('.search-wrapper');
4212+ if (searchWrapper) {
4213+ searchWrapper.addEventListener('click', (e) => {
4214+ // 1. Prüfen, ob der Klick auf einen Button ging. Wenn ja, nichts tun.
4215+ if (e.target.closest('button')) {
4216+ return;
4217+ }
4218+
4219+ // 2. Wenn das Panel noch nicht offen ist, den Fokus auf das Input-Feld setzen.
4220+ if (!this.isPanelExpanded) {
4221+ // Dies löst automatisch den bestehenden 'focus'-Event aus,
4222+ // der dann `expandPanel()` aufruft.
4223+ this.shadowRoot.querySelector('.search-input').focus();
4224+ }
4225+ });
4226+ }
42094227
42104228 // NEU: Resize Listener für Viewport-Wechsel
42114229 window.addEventListener('resize', () => {
You can’t perform that action at this time.
0 commit comments