Skip to content

Commit

Permalink
fix: scrolls only to focused reply form (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlopin committed Jul 16, 2024
1 parent 7982514 commit 099d6ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/static/js/components/ReplyForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default {
// the scroll is delayed to ensure the on-screen keyboard on mobile devices has opened
// to avoid the behavior on Safari for iOS, when the keyboard moves the content up
// (see more, https://stackoverflow.com/questions/56351216/ios-safari-unwanted-scroll-when-keyboard-is-opened-and-body-scroll-is-disabled)
setTimeout(() => {
this.isFocused && setTimeout(() => {
replyForm.scrollIntoView({ behavior: "smooth", block: "center" });
}, 50);
}
Expand Down

0 comments on commit 099d6ad

Please sign in to comment.