Skip to content

Commit

Permalink
Merge pull request #3653 from udecode/fix-preview
Browse files Browse the repository at this point in the history
Fix preview
  • Loading branch information
felixfeng33 authored Oct 22, 2024
2 parents c59d084 + 8c82ae3 commit 90ef7c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-mails-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-media': patch
---

Fix scrollbar issue.
2 changes: 1 addition & 1 deletion packages/media/src/react/image/openImagePreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/media/src/react/image/useImagePreview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 90ef7c1

Please sign in to comment.