fix: don't scroll page when TTDDialog is opened (#9455)

This commit is contained in:
Narek Malkhasyan 2025-05-07 15:33:18 +04:00 committed by GitHub
parent 3dc54a724a
commit a306a909a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,6 +34,7 @@ export const TTDDialogInput = ({
callbackRef.current?.();
}
};
textarea.focus();
textarea.addEventListener(EVENT.KEYDOWN, handleKeyDown);
return () => {
textarea.removeEventListener(EVENT.KEYDOWN, handleKeyDown);
@ -47,7 +48,6 @@ export const TTDDialogInput = ({
onChange={onChange}
value={input}
placeholder={placeholder}
autoFocus
ref={ref}
/>
);