Repository navigation
Commit ac096a2
committed
Prevent multiple prompt submissions by ignoring enter key repeat events
- it's been reported that holding e.g. 'enter' invokes on submit repeatedly
└── packages
└── ui
└── src
└── components
└── editor
└── common
└── prompts
├── PromptField
│ ├── PromptField.module.scss
│ ├── PromptField.stories.tsx
│ ├── PromptField.tsx
│ ├── components
│ │ ├── Tooltip.module.scss
│ │ ├── Tooltip.tsx
│ │ └── index.ts
│ ├── hooks
│ │ ├── use-drag-drop.ts
│ │ ├── use-dropdown.ts
│ │ ├── use-ghost-text.ts
│ │ ├── use-handlers
│ │ │ ├── handle-copy.ts
│ │ │ ├── handle-cut.ts
│ │ │ ├── handle-input-change.ts
│ │ │ ├── handle-input-click.ts
│ │ │ ├── handle-key-down.ts
│ │ │ ├── handle-paste.ts
│ │ │ ├── handle-submit.ts
│ │ │ ├── index.ts
│ │ │ ├── types.ts
│ │ │ ├── use-handlers.ts
│ │ │ └── utils.ts
│ │ └── use-keyboard-shortcuts.ts
│ └── index.ts
├── Template
│ ├── Template.module.scss
│ ├── Template.tsx
│ └── index.ts
└── shared
└── symbols
├── caret.ts
├── get-highlighted-text.tsx
├── index.ts
├── position-mapping.ts
├── prompt-symbols.module.scss
├── reconstruct-raw-value.ts
└── use-symbol-deletion.ts1 parent 123fecc commit ac096a2
1 file changed
Lines changed: 6 additions & 2 deletions
File tree
- packages/ui/src/components/editor/common/prompts/PromptField/hooks/use-handlers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
412 | 416 | | |
413 | 417 | | |
414 | 418 | | |
| |||
0 commit comments