fix: disable input autofocus

This commit is contained in:
Arthur 2023-02-03 15:55:45 +08:00 committed by Qaplagzy
parent 77a453acae
commit 129a08878a

View File

@ -282,16 +282,16 @@ const SheetOverlay: React.FC = () => {
refs.cellArea.current?.scrollTop,
]);
useEffect(() => {
// ensure cell input is always focused to accept first key stroke on cell
if (!context.editingCommentBox) {
refs.cellInput.current?.focus({ preventScroll: true });
}
}, [
context.editingCommentBox,
context.luckysheet_select_save,
refs.cellInput,
]);
// useEffect(() => {
// // ensure cell input is always focused to accept first key stroke on cell
// if (!context.editingCommentBox) {
// refs.cellInput.current?.focus({ preventScroll: true });
// }
// }, [
// context.editingCommentBox,
// context.luckysheet_select_save,
// refs.cellInput,
// ]);
useLayoutEffect(() => {
if (