fix(web-ui): 修复 macOS 下聊天输入框无法获取焦点的问题#1315
Open
su-yunhe wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复 macOS 桌面端聊天输入框无法稳定获取焦点的问题。
聊天输入框使用
contenteditable,而全局高 DPI 优化样式此前会对所有[contenteditable]元素强制应用transform: translateZ(0)和backface-visibility: hidden。这在 macOS 的 WKWebView 中可能干扰焦点与选区行为,导致输入框点击后无法正常进入可输入状态。本次修改保留了对原生
input/textarea的高 DPI 优化,但将contenteditable从强制合成层样式中拆出,以避免影响聊天输入框焦点。Fixes #1305
Type and Areas
Type:
Areas:
Motivation / Impact
解决 macOS 桌面端聊天输入框点击后无法正常获取焦点的问题,恢复基本输入体验。
对用户的直接影响是:在 macOS 版本中,会话页聊天输入框可以再次正常点击聚焦并输入内容。
Verification
pnpm run type-check:webReviewer Notes
src/web-ui/src/app/styles/utilities/high-dpi-optimization.cssinput/textarea的行为保持不变contenteditable输入区域,重点是聊天输入框修复前:

修复后:

Checklist