Skip to content

Commit f6401ce

Browse files
zombieJclaude
andcommitted
chore: add comment explaining preventDefault behavior for Space key
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cfa1ff5 commit f6401ce

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/BaseSelect/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ const BaseSelect = React.forwardRef<BaseSelectRef, BaseSelectProps>((props, ref)
470470

471471
// Enter or Space opens dropdown (ARIA combobox: spacebar should open)
472472
if (isEnterKey || isSpaceKey) {
473+
// Do not submit form when type in the input; prevent Space from scrolling page
473474
const isEditable = mode === 'combobox' || showSearch;
474475
if (!isEditable) {
475476
event.preventDefault();

0 commit comments

Comments
 (0)