Fix bug 69289: On ipad in horizontal view quota modal hides under keyboard when type something in input.

This commit is contained in:
Aleksandr Lushkin 2024-07-31 16:02:21 +02:00
parent cbd298b62f
commit 017040e68e

View File

@ -24,13 +24,14 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { useState, useRef } from "react";
import { useCallback, useState } from "react";
import { inject, observer } from "mobx-react";
import { useTranslation } from "react-i18next";
import { toastr } from "@docspace/shared/components/toast";
import { ChangeQuotaDialog } from "../dialogs";
let timerId = null;
const ChangeQuotaEvent = (props) => {
const {
@ -105,13 +106,13 @@ const ChangeQuotaEvent = (props) => {
onClose && onClose();
};
const onCloseClick = () => {
const onCloseClick = useCallback(() => {
timerId && clearTimeout(timerId);
timerId = null;
abortCallback && abortCallback();
onClose && onClose();
};
}, [onClose, abortCallback]);
return (
<ChangeQuotaDialog