mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix submit a challenge pressing enter
This commit is contained in:
@@ -37,7 +37,6 @@ const CaptchaModal = () => {
|
||||
}, [isCaptchaOpen, setIsAuthorDelete, setIsAuthorEdit, setIsModEdit]);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const handleResize = () => setIsMobile(window.innerWidth <= 480);
|
||||
window.addEventListener('resize', handleResize);
|
||||
@@ -71,7 +70,10 @@ const CaptchaModal = () => {
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.key === "Enter") {
|
||||
event.preventDefault();
|
||||
submitCaptcha();
|
||||
submitCaptcha((response) => {
|
||||
setCaptchaResponse(response);
|
||||
resolveCaptchaPromise(response);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user