From 8f49446a1537af484dcf4c34e0f6fe5b1ad52ec7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 23 Sep 2023 14:05:23 -0500 Subject: [PATCH] AutosuggestPlugin: pageYOffset --> scrollY --- src/features/compose/editor/plugins/autosuggest-plugin.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/compose/editor/plugins/autosuggest-plugin.tsx b/src/features/compose/editor/plugins/autosuggest-plugin.tsx index 66158bb66..6900d7a9e 100644 --- a/src/features/compose/editor/plugins/autosuggest-plugin.tsx +++ b/src/features/compose/editor/plugins/autosuggest-plugin.tsx @@ -213,8 +213,8 @@ const useMenuAnchorRef = ( if (rootElement !== null && resolution !== null) { const { left, top, width, height } = resolution.getRect(); - containerDiv.style.top = `${top + window.pageYOffset}px`; - containerDiv.style.left = `${left + window.pageXOffset}px`; + containerDiv.style.top = `${top + window.scrollY}px`; + containerDiv.style.left = `${left + window.scrollX}px`; containerDiv.style.height = `${height}px`; containerDiv.style.width = `${width}px`;