From 0425a58bc9312ceccfe99346687b04e94027680d Mon Sep 17 00:00:00 2001 From: Wesley Moses Date: Mon, 9 May 2022 22:46:18 +0300 Subject: [PATCH] [@mantine/rte] Fix scroll to top and flicker on paste (#1418) * [@mantine/core] Select: only use open/close callback when value changes * [@mantine/core] Select: do not use early return * [@mantine/rte] RichTextEditor: fix scroll and flicker on paste --- .../src/components/RichTextEditor/RichTextEditor.styles.ts | 2 +- .../src/components/RichTextEditor/RichTextEditor.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.styles.ts b/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.styles.ts index c745b7bd448..9f405773544 100644 --- a/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.styles.ts +++ b/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.styles.ts @@ -153,7 +153,7 @@ export default createStyles( left: '-100000px', height: '1px', overflowY: 'hidden', - position: 'absolute', + position: 'fixed', top: '50%', }, diff --git a/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.tsx b/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.tsx index e00cb423ffe..d1b3cda296a 100644 --- a/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.tsx +++ b/src/mantine-rte/src/components/RichTextEditor/RichTextEditor.tsx @@ -161,6 +161,7 @@ export const RichTextEditor = forwardRef( ref={mergeRefs(editorRef, ref)} placeholder={placeholder} readOnly={readOnly} + scrollingContainer="html" /> );