prevented mouse event propagation for chips and togglers

This commit is contained in:
2026-08-23 10:59:36 +02:00
parent 2bf8e03117
commit 04e3f97b8b
4 changed files with 8 additions and 2 deletions
@@ -87,6 +87,7 @@ export class AppAuthorChipComponent {
}
_onChipClick(event: MouseEvent | KeyboardEvent) {
event.stopPropagation();
const author = this._author();
if (this.handleChipClick && author) {
this.handleChipClick.emit(author);
@@ -90,6 +90,7 @@ export class AppTopicChipComponent {
});
_onChipClick(event: MouseEvent | KeyboardEvent) {
event.stopPropagation();
const topic = this.topic();
if (this.isClickable() && this.handleChipClick && topic) {
this.handleChipClick.emit(topic);
@@ -2,6 +2,6 @@
type="button"
class="chip-overflow-toggle"
[attr.aria-expanded]="expanded()"
(click)="toggle.emit()">
(click)="handleToggleClick($event)">
{{ expanded() ? 'weniger' : '+' + hiddenCount() }}
</button>
@@ -10,5 +10,9 @@ export class ChipOverflowToggleComponent {
expanded = input<boolean>(false);
hiddenCount = input<number>(0);
toggle = output<void>();
toggle = output<MouseEvent>();
handleToggleClick(event: MouseEvent): void {
event.stopPropagation();
this.toggle.emit(event);
}
}