Skip to content

Commit

Permalink
Fix bug that menus are opened
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcconechy committed Sep 4, 2024
1 parent e59c27f commit 7e2efc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- `[Datagrid]` Fix Clear Row / Eraser button so that changes persist throughout pagination. ([#2615](https://github.com/infor-design/enterprise-wc/issues/2615))
- `[LoadingIndicator]` Added a setting `contained` which confines the loading indicator within it's nearest parent. ([#2256](https://github.com/infor-design/enterprise-wc/issues/2256))
- `[NotificationBanner]` Added a notification service which can be used to manage notification banners on a page. ([#2160](https://github.com/infor-design/enterprise-wc/issues/2160))
- `[Popup]` Fixed a bug where in Angular the click events cause menus to open when navigating. ([#2747](https://github.com/infor-design/enterprise-wc/issues/2747))
- `[SegmentedControl]` Added the IdsSegmentedControl component. ([#2180]https://github.com/infor-design/enterprise-wc/issues/2180)
- `[Switch]` Added a label position setting that allows positioning the label on either the right or left side of the slider. ([#2579](https://github.com/infor-design/enterprise-wc/issues/2579))
- `[Themes]` Added a setting `IdsGlobal.themePath` that you can use to set the location of the theme files. ([#2125](https://github.com/infor-design/enterprise-wc/issues/2125))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,14 @@ const IdsPopupInteractionsMixin = <T extends Constraints>(superclass: T) => clas
}

// Open/Close the menu when the trigger element is clicked
this.offEvent('click.trigger');
this.onEvent('click.trigger', targetElem, (e: Event) => {
if (typeof this.onTriggerClick === 'function') {
return this.onTriggerClick(e);
}
return true;
requestAnimationFrame(() => {
this.offEvent('click.trigger');
this.onEvent('click.trigger', targetElem, (e: Event) => {
if (typeof this.onTriggerClick === 'function') {
return this.onTriggerClick(e);
}
return true;
});
});

break;
Expand Down

0 comments on commit 7e2efc2

Please sign in to comment.