mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix dropdown behavior - network
This commit is contained in:
parent
34834c108d
commit
4044b58b5a
@ -198,7 +198,17 @@ App.prototype.renderNetworkDropdown = function () {
|
|||||||
return h(Dropdown, {
|
return h(Dropdown, {
|
||||||
isOpen,
|
isOpen,
|
||||||
onClickOutside: (event) => {
|
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,
|
zIndex: 11,
|
||||||
style: {
|
style: {
|
||||||
|
Loading…
Reference in New Issue
Block a user