feat: allow navigate back when cursor is at the beginning (#940)

* feat: allow navigate back when cursor is at the beginning

* docs: update changelog
This commit is contained in:
ayangweb
2025-10-21 15:58:53 +08:00
committed by GitHub
parent cbd8dc52cd
commit 731cfc5bd7
2 changed files with 4 additions and 2 deletions

View File

@@ -20,8 +20,10 @@ feat: support pageup/pagedown to navigate search results #920
feat: standardize multi-level menu label structure #925
feat(View Extension): page field now accepts HTTP(s) links #925
feat: return sub-exts when extension type exts themselves are matched #928
feat: allow navigate back when cursor is at the beginning #940
feat: open quick ai with modifier key + enter #939
### 🐛 Bug fix
fix: automatic update of service list #913

View File

@@ -103,9 +103,9 @@ export function useAssistantManager({
const handleKeyDownAutoResizeTextarea = useCallback(
(e: React.KeyboardEvent<HTMLTextAreaElement>) => {
const { key, shiftKey, currentTarget } = e;
const { value } = currentTarget;
const { value, selectionStart } = currentTarget;
if (key === "Backspace" && value === "") {
if (key === "Backspace" && (value === "" || selectionStart === 0)) {
e.preventDefault();
return navigateBack();