Skip to content

Commit 3f7ef62

Browse files
authored
fix(textinput): correct tab key handling in useTextInput hook (#743)
1 parent dffb8c6 commit 3f7ef62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui/TextInput/hooks/useTextInput.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ export function useTextInput({
342342
}
343343
case key.return:
344344
return () => handleEnter(key);
345+
// key.tab is true for both Tab and Shift+Tab, key.shift indicates if Shift was held
345346
case key.tab:
346-
case key.shift && key.tab:
347-
return () => onTabPress?.(key.shift && key.tab);
347+
return () => onTabPress?.(key.shift);
348348
case key.upArrow:
349349
return upOrHistoryUp;
350350
case key.downArrow:

0 commit comments

Comments
 (0)