Skip to content

Commit

Permalink
fix: replace pageYOffset with scrollY (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathdevelop authored Oct 30, 2023
1 parent 36b43fd commit bd8b443
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MegadraftEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit bd8b443

Please sign in to comment.