Global shortcuts fire while barcode mode is active (P opens Properties, Enter launches the selected file)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, python, react
调研方向
先阅读 issue 中指出的相关监听器 useBarcodeMode 和 useGlobalShortcuts。选择一个文件后重现 p 和 Enter 的情况,然后检查条码模式测试的覆盖情况。当已处理的 wedge 输入不再触发全局快捷键,而 Escape 和缓冲区为空时的 Enter 仍会继续传播时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Repro (no barcode scanner needed)
- Have at least one file listed and selected.
Ctrl+B→ barcode mode ON.- Blindly type
filter=.pdf→ typing thepopens the Properties modal of the selected file (the char is also accumulated into the wedge buffer). - Or blindly type
filter=.md, thenEnter→ the filter is applied, but the same Enter also executes/opens the selected file (global Enter shortcut).
Root cause
useBarcodeMode's document-level capture-phase keydown listener consumes wedge-scanner keystrokes (printable accumulation, Enter with a non-empty buffer) but never calls stopPropagation(). Every keydown therefore still reaches the global-shortcuts window listener (useGlobalShortcuts), whose colliding branches are:
- plain
p(no modifiers) with a selected file → Properties modal - plain
?→ shortcuts modal Enterwith a selected file → execute/launch
A real USB/wedge scanner typing a payload hits the exact same leaks — this is not specific to manual typing.
This predates the #148 refactor (the same two listeners coexisted inline in pre-refactor App.tsx; verified at main and at 332e951). The decomposition preserved it verbatim under the "quirks survive" policy, and the characterization tests only exercised barcode input on an empty file list, where both leaks were harmless no-ops.
Proposed fix
stopPropagation() on exactly the keys the wedge handler consumes (printable accumulate; Enter with a non-empty buffer). Escape and empty-buffer Enter keep propagating, preserving modal-close and manual-execute behavior.
- 主要语言
- Python
- 星标
- 1
- 派生
- 1
- 平均合并
- 4 小时 46 分钟
- 30 天内合并 PR
- 55
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
falbany/ProFiles 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
相似的 Issue
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 86/100
aws-samples/sample-spec-driven-presentation-maker#648 ·
维护者通常 1 天内回复
-
firestore: enable live window.yaml pipeline system tests once add_window_fields is in production未关闭
难度 1/5 1 小时以内 新手友好度 64/100
googleapis/google-cloud-python#19115 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Feyisara2108/stellargive#1377 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复