mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -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 gettext from 'sources/gettext';
|
||||||
import { Box } from '@material-ui/core';
|
import { Box } from '@material-ui/core';
|
||||||
import { DefaultButton, PrimaryButton } from '../components/Buttons';
|
import { DefaultButton, PrimaryButton } from '../components/Buttons';
|
||||||
@ -44,11 +44,10 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight}
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(()=>{
|
|
||||||
setTimeout(()=>{
|
useLayoutEffect(()=>{
|
||||||
firstEleRef.current && firstEleRef.current.focus();
|
firstEleRef.current?.focus();
|
||||||
}, 350);
|
}, []);
|
||||||
}, [firstEleRef.current]);
|
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
setHeight?.(containerRef.current?.offsetHeight);
|
setHeight?.(containerRef.current?.offsetHeight);
|
||||||
|
Loading…
Reference in New Issue
Block a user