Skip to content

Commit 7914836

Browse files
authored
fix: correct enter key behavior (#828)
1 parent b37bf1f commit 7914836

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/content.en/docs/release-notes/_index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ Information about release notes of Coco Server is provided here.
1111

1212
### ❌ Breaking changes
1313

14-
1514
### 🚀 Features
1615

17-
1816
### 🐛 Bug fix
1917

18+
- fix: correct enter key behavior #828
2019

2120
### ✈️ Improvements
2221

src/components/Search/AssistantManager.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,13 @@ export function useAssistantManager({
135135
}
136136

137137
if (key === "Enter" && !shiftKey) {
138-
if (!isEmpty(value)) {
139-
e.stopPropagation();
140-
}
141138
e.preventDefault();
142139

143140
if (isTauri && !isChatMode && goAskAi) {
141+
if (!isEmpty(value)) {
142+
e.stopPropagation();
143+
}
144+
144145
return handleAskAi();
145146
}
146147

0 commit comments

Comments
 (0)