Don't scroll page when TTDDialog is opened

This commit is contained in:
Narek Malkhasyan 2025-04-30 09:31:09 +04:00
parent c9ddf6075b
commit 5a88b95df5

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}
/>
);