Fix Bug 54569 - Client.Files. Switch tab automatically completes the creation of the file

This commit is contained in:
Timofey Boyko 2022-05-31 12:24:13 +03:00
parent 7c511eb4db
commit ce0fca842b

View File

@ -198,6 +198,8 @@ const EditingWrapperComponent = (props) => {
const [CancelIconIsHovered, setIsHoveredCancel] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const inputRef = React.useRef(null);
const onKeyUpUpdateItem = (e) => {
if (isLoading) return;
@ -228,6 +230,8 @@ const EditingWrapperComponent = (props) => {
)
return false;
if (!document.hasFocus() && inputRef.current === e.target) return false;
!passwordEntryProcess && onClickUpdateItem(e, false);
};
@ -256,6 +260,7 @@ const EditingWrapperComponent = (props) => {
isDisabled={isLoading}
data-itemid={itemId}
withBorder={!isTable}
forwardedRef={inputRef}
/>
)}
{!isUpdatingRowItem && (