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. 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(