Skip to content

Commit 895ea31

Browse files
committed
fix bug with spaces
1 parent 11407b2 commit 895ea31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/src/components/ask-user/hooks/use-keyboard-navigation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ export function useKeyboardNavigation(params: KeyboardNavigationParams) {
136136
!key.meta &&
137137
!key.shift
138138
) {
139-
// Don't handle space in text input (allow typing spaces)
139+
// Handle space in text input: add space character and return
140140
if (isFocusOnTextInput(focus) && key.name === 'space') {
141+
const currentText = otherTexts[currentQuestionIndex] || ''
142+
onOtherTextChange(currentQuestionIndex, currentText + ' ')
141143
return
142144
}
143145

0 commit comments

Comments
 (0)