File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ export function NetworkSelector(): ReactNode {
159159 const { chainId } = useWalletInfo ( )
160160 const node = useRef < HTMLDivElement > ( null )
161161 const nodeMobile = useRef < HTMLDivElement > ( null )
162+ const nodeSelector = useRef < HTMLDivElement > ( null )
162163 const isOpen = useModalIsOpen ( ApplicationModal . NETWORK_SELECTOR )
163164 const toggleModal = useToggleModal ( ApplicationModal . NETWORK_SELECTOR )
164165
@@ -169,7 +170,7 @@ export function NetworkSelector(): ReactNode {
169170 const info = getChainInfo ( chainId )
170171 const isUpToMedium = useMediaQuery ( Media . upToMedium ( false ) )
171172
172- useOnClickOutside ( isUpToMedium ? [ nodeMobile ] : [ node ] , ( ) => {
173+ useOnClickOutside ( isUpToMedium ? [ nodeMobile , nodeSelector ] : [ node ] , ( ) => {
173174 if ( isOpen ) {
174175 toggleModal ( )
175176 }
@@ -187,7 +188,7 @@ export function NetworkSelector(): ReactNode {
187188
188189 return (
189190 < SelectorWrapper ref = { node } onClick = { toggleModal } >
190- < SelectorControls isChainIdUnsupported = { isChainIdUnsupported } >
191+ < SelectorControls ref = { nodeSelector } isChainIdUnsupported = { isChainIdUnsupported } >
191192 { ! isChainIdUnsupported ? (
192193 < >
193194 < SelectorLogo src = { logoUrl } />
You can’t perform that action at this time.
0 commit comments