Skip to content

Commit 650bf23

Browse files
authored
Update fast-search-card.js
1 parent fa8b64b commit 650bf23

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

dist/fast-search-card.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ class FastSearchCard extends HTMLElement {
592592
opacity: 0;
593593
flex-shrink: 0;
594594
transition: all 0.2s ease;
595+
touch-action: manipulation;
596+
-webkit-tap-highlight-color: transparent;
597+
user-select: none;
595598
}
596599

597600
.clear-button.visible {
@@ -4187,7 +4190,19 @@ class FastSearchCard extends HTMLElement {
41874190
searchInput.addEventListener('keydown', (e) => this.handleSearchKeydown(e));
41884191
searchInput.addEventListener('focus', () => this.handleSearchFocus());
41894192
searchInput.addEventListener('blur', () => this.clearSuggestion());
4190-
clearButton.addEventListener('click', (e) => { e.stopPropagation(); this.clearSearch(); });
4193+
4194+
// Touch-Events für Mobile hinzufügen
4195+
clearButton.addEventListener('click', (e) => {
4196+
e.stopPropagation();
4197+
e.preventDefault();
4198+
this.clearSearch();
4199+
});
4200+
clearButton.addEventListener('touchend', (e) => {
4201+
e.stopPropagation();
4202+
e.preventDefault();
4203+
this.clearSearch();
4204+
});
4205+
41914206
categoryIcon.addEventListener('click', (e) => { e.stopPropagation(); this.toggleCategoryButtons(); });
41924207
categoryButtons.forEach(button => {
41934208
button.addEventListener('click', (e) => { e.stopPropagation(); this.handleCategorySelect(button); });

0 commit comments

Comments
 (0)