aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index f293e89bd..8fad0f7d6 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -198,7 +198,17 @@ App.prototype.renderNetworkDropdown = function () {
return h(Dropdown, {
isOpen,
onClickOutside: (event) => {
- this.setState({ isNetworkMenuOpen: !isOpen })
+ const { classList } = event.target
+ const isNotToggleElement = [
+ classList.contains('menu-icon'),
+ classList.contains('network-name'),
+ classList.contains('network-indicator'),
+ ].filter(bool => bool).length === 0;
+ // classes from three constituent nodes of the toggle element
+
+ if (isNotToggleElement) {
+ this.setState({ isNetworkMenuOpen: false })
+ }
},
zIndex: 11,
style: {