diff --git a/src/Input.tsx b/src/Input.tsx index 7ab86fb..c2a7e23 100644 --- a/src/Input.tsx +++ b/src/Input.tsx @@ -157,17 +157,17 @@ const Input = forwardRef((props, ref) => { }; const handleKeyDown = (e: React.KeyboardEvent) => { - onKeyDown?.(e); if (onPressEnter && e.key === 'Enter' && !keyLockRef.current) { keyLockRef.current = true; onPressEnter(e); } + onKeyDown?.(e); }; const handleKeyUp = (e: React.KeyboardEvent) => { - onKeyUp?.(e); if (e.key === 'Enter') { keyLockRef.current = false; } + onKeyUp?.(e); }; const handleFocus: React.FocusEventHandler = (e) => {