diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-07-29 06:55:55 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-07-29 06:55:55 +0800 |
commit | 4044b58b5a7133caeefd0f3c0a16478387fe7247 (patch) | |
tree | 9ba21e96e2d440aa1def0e95cfdfaaf4b6eea55c | |
parent | 34834c108dafd1de75f26a09d78feb8949ef5e56 (diff) | |
download | tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.tar tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.tar.gz tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.tar.bz2 tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.tar.lz tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.tar.xz tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.tar.zst tangerine-wallet-browser-4044b58b5a7133caeefd0f3c0a16478387fe7247.zip |
Fix dropdown behavior - network
-rw-r--r-- | ui/app/app.js | 12 |
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: { |