Skip to content

Commit 79cf6f2

Browse files
committed
tweak click handler
1 parent eeede22 commit 79cf6f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/material/chips/chip-row.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ export class MatChipRow extends MatChip implements AfterViewInit {
160160

161161
_handleClick(event: MouseEvent) {
162162
if (!this.disabled && this.editable && !this._isEditing && this._alreadyFocused) {
163+
// Ensure click event not picked up unintentionally by other listeners, as
164+
// once editing starts, the source element is detached from DOM.
165+
event.preventDefault();
166+
event.stopPropagation();
163167
this._startEditing(event);
164168
}
165169
}

0 commit comments

Comments
 (0)