File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
packages/curve-ui-kit/src/features/connect-wallet/ui Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,29 @@ export const WagmiConnectModal = () => {
7979 } ) )
8080
8181 return (
82- < ModalDialog open = { showModal } onClose = { closeModal } title = { t `Connect Wallet` } titleAction = { < WalletIcon /> } compact >
82+ < ModalDialog
83+ open = { showModal }
84+ onClose = { closeModal }
85+ title = { t `Connect Wallet` }
86+ titleAction = { < WalletIcon /> }
87+ compact
88+ sx = { {
89+ /*
90+ When connecting with WalletConnect, we hide this dialog because the MUI Dialog
91+ component adds a tabIndex of -1 to its container. This prevents text input in
92+ the "Search wallet" field of the WC modal — it's not a z-index issue, but
93+ caused by the tabIndex itself.
94+
95+ Although MUI provides a slotProp for the container, the tabIndex is still set
96+ to -1 internally, regardless of what you specify. Other slotProps work fine,
97+ so this behavior seems hardcoded in MUI.
98+
99+ The most reliable fix is to skip rendering this modal while WalletConnect
100+ is connecting, rather than patching the tabIndex via a flaky JavaScript hack.
101+ */
102+ ...( isConnectingType === 'walletConnect' && { display : 'none' } ) ,
103+ } }
104+ >
83105 { error ? (
84106 < Alert variant = "filled" severity = "error" >
85107 < AlertTitle > { t `Error connecting wallet` } </ AlertTitle >
You can’t perform that action at this time.
0 commit comments