Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Keep the mobile keyboard open after backspace

Danielc9211535bc14
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index 580a0ac93c..2f0286f4a9 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -708,8 +708,12 @@ export const hideKeyboardToolbar = () => {
export const hideKeyboardToolbarByApp = () => {
hideKeyboardToolbar();
+ const selection = getSelection();
+ if (!selection || selection.isCollapsed) {
+ return;
+ }
(document.activeElement as HTMLElement)?.blur();
- getSelection()?.removeAllRanges();
+ selection.removeAllRanges();
};
export const activeBlur = () => {