From d63eef905ca58817005d5319b8573170fae76d27 Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Mon, 21 Oct 2024 21:10:20 +0800 Subject: [PATCH 1/2] fix --- packages/media/src/react/image/openImagePreview.ts | 2 +- packages/media/src/react/image/useImagePreview.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/media/src/react/image/openImagePreview.ts b/packages/media/src/react/image/openImagePreview.ts index 67ee953125..4ff895af8b 100644 --- a/packages/media/src/react/image/openImagePreview.ts +++ b/packages/media/src/react/image/openImagePreview.ts @@ -23,7 +23,7 @@ export const openImagePreview = ( ) => { const { id, url } = element; const urlList = getUrlList(editor); - document.documentElement.style.overflowY = 'hidden'; + // document.documentElement.style.overflowY = 'hidden'; imagePreviewActions.openEditorId(editor.id); imagePreviewActions.currentPreview({ id, url }); imagePreviewActions.previewList(urlList); diff --git a/packages/media/src/react/image/useImagePreview.ts b/packages/media/src/react/image/useImagePreview.ts index d73ee9bbde..72f2590b01 100644 --- a/packages/media/src/react/image/useImagePreview.ts +++ b/packages/media/src/react/image/useImagePreview.ts @@ -114,7 +114,7 @@ export const useImagePreview = ({ const onClose = useCallback(() => { imagePreviewActions.close(); - document.documentElement.style.overflowY = 'scroll'; + // document.documentElement.style.overflowY = 'scroll'; }, []); const [prevDisabled, nextDisabled] = useMemo( From 8c82ae377d94301c0648694b912a96c9a7fd2512 Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Mon, 21 Oct 2024 21:12:08 +0800 Subject: [PATCH 2/2] docs --- .changeset/wet-mails-smoke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wet-mails-smoke.md diff --git a/.changeset/wet-mails-smoke.md b/.changeset/wet-mails-smoke.md new file mode 100644 index 0000000000..b9148fe4a4 --- /dev/null +++ b/.changeset/wet-mails-smoke.md @@ -0,0 +1,5 @@ +--- +'@udecode/plate-media': patch +--- + +Fix scrollbar issue.