From 692455c8f0eb5927d5a449ea3688b79007ed884f Mon Sep 17 00:00:00 2001 From: Fimeg Date: Tue, 11 Aug 2026 18:24:24 -0400 Subject: [PATCH] chat: raise the keyboard when the field is tapped --- .../modules/ii/sidebarLeft/AiChat.qml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/surfaces/quickshell/modules/ii/sidebarLeft/AiChat.qml b/surfaces/quickshell/modules/ii/sidebarLeft/AiChat.qml index 4a12aa9..bba12a1 100644 --- a/surfaces/quickshell/modules/ii/sidebarLeft/AiChat.qml +++ b/surfaces/quickshell/modules/ii/sidebarLeft/AiChat.qml @@ -590,6 +590,26 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) background: null + // Input-method focus is evidence that typing is + // possible, not a reliable request to show the OSK. + // ViewTop preserves focus across a keyboard dismiss, + // so a second tap may not produce another focus edge. + // Drive both paths: focus raises it the first time; + // every deliberate tap raises it again after a user + // dismissal. The user-close path remains authoritative + // and no hold is taken merely because chat is open. + onActiveFocusChanged: { + if (activeFocus) + GlobalStates.oskOpen = true; + } + + TapHandler { + onTapped: { + messageInputField.forceActiveFocus(); + GlobalStates.oskOpen = true; + } + } + onTextChanged: { // Handle suggestions if (messageInputField.text.length === 0) {