From 3112acff9b159c2c7eca2f8901edd4dd29135d7c Mon Sep 17 00:00:00 2001 From: Daniel Lautzenheiser Date: Mon, 17 Apr 2023 14:14:00 -0400 Subject: [PATCH] Fix scrollbar position for no-preview editor --- .../src/components/common/select/Select.tsx | 2 +- .../entry-editor/EditorInterface.tsx | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/packages/core/src/components/common/select/Select.tsx b/packages/core/src/components/common/select/Select.tsx index e0e6451b..81c8307b 100644 --- a/packages/core/src/components/common/select/Select.tsx +++ b/packages/core/src/components/common/select/Select.tsx @@ -2,13 +2,13 @@ import SelectUnstyled from '@mui/base/SelectUnstyled'; import { KeyboardArrowDown as KeyboardArrowDownIcon } from '@styled-icons/material/KeyboardArrowDown'; import React, { forwardRef, useCallback, useState } from 'react'; +import useDebounce from '@staticcms/core/lib/hooks/useDebounce'; import useElementSize from '@staticcms/core/lib/hooks/useElementSize'; import classNames from '@staticcms/core/lib/util/classNames.util'; import { isNotEmpty } from '@staticcms/core/lib/util/string.util'; import Option from './Option'; import type { FocusEvent, KeyboardEvent, MouseEvent, ReactNode, Ref } from 'react'; -import useDebounce from '@staticcms/core/lib/hooks/useDebounce'; export interface Option { label: string; diff --git a/packages/core/src/components/entry-editor/EditorInterface.tsx b/packages/core/src/components/entry-editor/EditorInterface.tsx index 488f4c72..f191227a 100644 --- a/packages/core/src/components/entry-editor/EditorInterface.tsx +++ b/packages/core/src/components/entry-editor/EditorInterface.tsx @@ -3,6 +3,7 @@ import { ScrollSyncPane } from 'react-scroll-sync'; import useBreadcrumbs from '@staticcms/core/lib/hooks/useBreadcrumbs'; import { getI18nInfo, getPreviewEntry, hasI18n } from '@staticcms/core/lib/i18n'; +import classNames from '@staticcms/core/lib/util/classNames.util'; import { getFileFromSlug, selectEntryCollectionTitle, @@ -47,7 +48,7 @@ const EditorContent = ({ } else { return (
-
{editor}
+
{editor}
); } @@ -166,12 +167,17 @@ const EditorInterface = ({