mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #22922] [CLOSED] fix: dismiss mobile soft keyboard after sending message #65786
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22922
Author: @Thump604
Created: 3/21/2026
Status: ❌ Closed
Base:
main← Head:fix/mobile-keyboard-dismiss-on-send📝 Commits (1)
01accd4fix: dismiss mobile soft keyboard after sending message📊 Changes
2 files changed (+19 additions, -1 deletions)
View changed files
📝
src/lib/components/channel/MessageInput.svelte(+7 -1)📝
src/lib/components/chat/MessageInput.svelte(+12 -0)📄 Description
Summary
On iOS Safari (both browser and PWA), the soft keyboard remains visible after sending a message. Users must manually tap the chat area to dismiss it. This degrades the mobile experience — the keyboard covers half the screen and obscures the AI response.
Root Cause
After dispatching the submit event, no
blur()is called on the textarea/contenteditable input. On desktop this is invisible (physical keyboard), but on mobile the soft keyboard stays open because the input retains focus.Fix
Call
document.activeElement?.blur()after submit, gated behind'ontouchstart' in windowso desktop behavior (keeping focus for rapid follow-up messages) is unchanged.Applied to:
MessageInput.svelte— all 3 submit paths: form submit, Enter key, speech auto-sendMessageInput.svelte— replaced unconditionalchatInputElement.focus()with mobile-aware blur/focusTesting
Related Issues
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.