mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 19:47: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 switching groups via keyboard shortcuts #911
|
||||||
feat: support opening logs from about page #915
|
feat: support opening logs from about page #915
|
||||||
|
feat: support moving cursor with home and end keys #918
|
||||||
|
|
||||||
### 🐛 Bug fix
|
### 🐛 Bug fix
|
||||||
|
|
||||||
|
|||||||
@@ -147,6 +147,17 @@ export function useAssistantManager({
|
|||||||
|
|
||||||
handleSubmit();
|
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,
|
isChatMode,
|
||||||
|
|||||||
Reference in New Issue
Block a user