removed scrolling on thread

This commit is contained in:
plebbitor
2023-04-24 16:35:09 +02:00
parent 661f925f07
commit 5865264923
2 changed files with 3 additions and 5 deletions
+3 -1
View File
@@ -39,6 +39,7 @@ const CaptchaModal = () => {
const handleKeyDown = (event) => { const handleKeyDown = (event) => {
if (event.key === "Enter") { if (event.key === "Enter") {
event.preventDefault();
submitCaptcha(); submitCaptcha();
} }
}; };
@@ -54,10 +55,11 @@ const CaptchaModal = () => {
const submitCaptcha = (callback) => { const submitCaptcha = (callback) => {
setCaptchaResponse(responseRef.current.value); setCaptchaResponse(responseRef.current.value);
setIsCaptchaOpen(false); setIsCaptchaOpen(false);
if (callback) { if (callback) {
callback(responseRef.current.value); callback(responseRef.current.value);
} }
}; };
return ( return (
-4
View File
@@ -153,10 +153,6 @@ const Thread = () => {
const handleSubmit = async (event) => { const handleSubmit = async (event) => {
event.preventDefault(); event.preventDefault();
setTimeout(() => {
window.scrollTo(0, document.body.scrollHeight);
}, 100)
setPublishCommentOptions((prevPublishCommentOptions) => ({ setPublishCommentOptions((prevPublishCommentOptions) => ({
...prevPublishCommentOptions, ...prevPublishCommentOptions,
author: { author: {