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