Skip to content

Commit

Permalink
fix(chip): stop propagation of cancel
Browse files Browse the repository at this point in the history
When closing the menu for the action menu the cancel event was never
stopped. This cancel event eventually bubbled all the way up to the
object creation dialog effectively closing it upon a scrim click of the
action menu.

This fix stops the propagation of the cancel event following a close of
the action menu dialog.

fixes: Lundalogik/crm-feature#4613
  • Loading branch information
civing committed Feb 21, 2025
1 parent 6418d3c commit e892bb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/chip/chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export class Chip implements ChipInterface {
items={menuItems}
onSelect={this.handleActionMenuSelect}
openDirection="bottom-end"
onCancel={this.handleActionMenuCancel}
>
<button
slot="trigger"
Expand Down Expand Up @@ -461,4 +462,8 @@ export class Chip implements ChipInterface {

this.menuItemSelected.emit(menuItem);
};

private handleActionMenuCancel = (event: LimelMenuCustomEvent<void>) => {
event.stopPropagation();
};
}

0 comments on commit e892bb0

Please sign in to comment.