Repository navigation
Conversation
搜索浮窗打开且前台可见时,焦点在编辑器按 ⌘1~9 / Enter 无法定位: 根节点 capture 键处理只在焦点在浮窗内触发,⌘1~9 落到全局卡片直开。 仿既有 ↑↓ 的 document 级 capture 处理器,新增 ⌘1~9 直达与 Enter 定位 分支:浮窗打开 + 所属窗格可见 + 焦点不在浮窗内 + 焦点不在浮窗外的普通 可编辑元素内时拦截,stopPropagation 阻止全局 card-open 抢占;焦点在 浮窗内仍走根节点 capture,不重复处理。关闭浮窗即随 effect 解绑。 e2e:新增 search-shortcut-global.spec.ts 覆盖编辑器聚焦 ⌘3/Enter、 浮窗外输入框不劫持、关闭后无残留。
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.
关联
fixes #1987
影响
搜索浮窗前台可见时,⌘1
9 直达、Enter 定位无需焦点在浮窗内(spec S-5);焦点在浮窗外的普通输入框时不劫持;浮窗关闭后 ⌘19 恢复全局卡片直开。验证(先红后绿)
Expected: 2, Received: 0(3 例失败)e2e/search-shortcut-global.spec.ts4 passednpx tsc --noEmit0;npx eslint src/0 error;vitestlocalHotkeys/shortcuts 17 passedsearch-float.spec.ts:1483圆角 8 vs 12,stash 对照无关)备注
WKWebView 下浮窗前台 + 编辑器聚焦的 ⌘N 行为建议真机复验。