From bd8b4431f05d650270e895cd3c42576b11114015 Mon Sep 17 00:00:00 2001 From: Matheus Alves Date: Mon, 30 Oct 2023 10:26:28 -0300 Subject: [PATCH] fix: replace pageYOffset with scrollY (#437) --- src/components/MegadraftEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MegadraftEditor.js b/src/components/MegadraftEditor.js index a2a0fc15..d0b079e8 100644 --- a/src/components/MegadraftEditor.js +++ b/src/components/MegadraftEditor.js @@ -406,7 +406,7 @@ export default class MegadraftEditor extends Component { input && input.focus(); control.scrollIntoView({ block: "center" }); - window.scroll(0, window.pageYOffset - control.clientHeight / 2); + window.scroll(0, window.scrollY - control.clientHeight / 2); swapEffect();