From e3b5c51455e4cc82eaa3478c1f7f2659bdc05aae Mon Sep 17 00:00:00 2001 From: emyarod Date: Wed, 12 Feb 2020 18:05:31 -0600 Subject: [PATCH] fix(OverflowMenu): call closeMenu method only when menu is open --- packages/react/src/components/OverflowMenu/OverflowMenu.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react/src/components/OverflowMenu/OverflowMenu.js b/packages/react/src/components/OverflowMenu/OverflowMenu.js index e135065af4bc..c7d6ee083a74 100644 --- a/packages/react/src/components/OverflowMenu/OverflowMenu.js +++ b/packages/react/src/components/OverflowMenu/OverflowMenu.js @@ -347,7 +347,10 @@ class OverflowMenu extends Component { }; handleClickOutside = evt => { - if (!this._menuBody || !this._menuBody.contains(evt.target)) { + if ( + this.state.open && + (!this._menuBody || !this._menuBody.contains(evt.target)) + ) { this.closeMenu(); } };