mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-28 01:41:13 -06:00
Ensure focus is not changed to ssh tunnel password input when user explicitly focus on server password input.
This commit is contained in:
parent
412375af3c
commit
37362541bf
@ -7,7 +7,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import React, { useState, useRef, useEffect, useLayoutEffect } from 'react';
|
||||
import gettext from 'sources/gettext';
|
||||
import { Box } from '@material-ui/core';
|
||||
import { DefaultButton, PrimaryButton } from '../components/Buttons';
|
||||
@ -44,11 +44,10 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(()=>{
|
||||
setTimeout(()=>{
|
||||
firstEleRef.current && firstEleRef.current.focus();
|
||||
}, 350);
|
||||
}, [firstEleRef.current]);
|
||||
|
||||
useLayoutEffect(()=>{
|
||||
firstEleRef.current?.focus();
|
||||
}, []);
|
||||
|
||||
useEffect(()=>{
|
||||
setHeight?.(containerRef.current?.offsetHeight);
|
||||
|
Loading…
Reference in New Issue
Block a user