mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 03:27:43 +01:00
feat: support moving cursor with home and end keys (#918)
* feat: support moving cursor with home and end keys * docs: add release notes
This commit is contained in:
@@ -15,6 +15,7 @@ Information about release notes of Coco App is provided here.
|
||||
|
||||
feat: support switching groups via keyboard shortcuts #911
|
||||
feat: support opening logs from about page #915
|
||||
feat: support moving cursor with home and end keys #918
|
||||
|
||||
### 🐛 Bug fix
|
||||
|
||||
|
||||
@@ -147,6 +147,17 @@ export function useAssistantManager({
|
||||
|
||||
handleSubmit();
|
||||
}
|
||||
|
||||
if (key === "Home") {
|
||||
e.preventDefault();
|
||||
return currentTarget.setSelectionRange(0, 0);
|
||||
}
|
||||
|
||||
if (key === "End") {
|
||||
e.preventDefault();
|
||||
const length = currentTarget.value.length;
|
||||
return currentTarget.setSelectionRange(length, length);
|
||||
}
|
||||
},
|
||||
[
|
||||
isChatMode,
|
||||
|
||||
Reference in New Issue
Block a user