Skip to content

Commit

Permalink
fix(Menu): update drilldown transition event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcfaul committed Aug 6, 2024
1 parent 30e3c03 commit a63a1d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-core/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
if (this.context) {
this.setState({ disableHover: this.context.disableHover });
}
if (canUseDOM) {
if (canUseDOM && this.props.containsDrilldown) {
window.addEventListener('transitionend', this.props.isRootMenu ? this.handleDrilldownTransition : null);
}

this.allowTabFirstItem();
}

componentWillUnmount() {
if (canUseDOM) {
if (canUseDOM && this.props.containsDrilldown) {
window.removeEventListener('transitionend', this.handleDrilldownTransition);
}
}
Expand Down

0 comments on commit a63a1d9

Please sign in to comment.