[Bug]: Target width input clamps the value on every keystroke
维护者通常 1 天内回复
@AnushreeKasturi 已经在做这个了。
开始于 2026年10月17日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
阅读 crates/app/src/controls.rs:449-478,重点查看目标宽度输入处理器及其 prop:value 绑定。输入 1000 重现问题,并检查显示值何时变化。输入时保留原始值,在值发生变化或字段失去焦点时进行限幅,并验证清空字段仍会禁用目标宽度。
由索引模型根据 Issue 内容生成。
描述
What happened?
The target width input clamps its value on every keystroke. Typing "1000" does not work: after the first character "1" the value is clamped to the minimum (320), and the reactive prop:value binding rewrites the field. The user ends up with a value they did not type.
Steps to reproduce
- Open the app.
- Click the "Target width" input.
- Type 1000 and watch the field.
Expected behavior
The raw typed value stays in the field while typing, and clamping happens on change or blur. Changing the field to empty disables the target width (current behavior, keep it).
Actual behavior
on:input parses and clamps on every keystroke (crates/app/src/controls.rs:466-473), and prop:value immediately writes the clamped value back, producing results like 3200 instead of 1000.
Where did it go wrong?
UI controls / settings
Settings
Not applicable.
Browser
Any.
CodeFrame version
0.7.0
Console output or extra context
Reference: crates/app/src/controls.rs:449-478. Suggested fix: switch to on:change for clamping, or only clamp when the parsed value is out of range and the input is no longer focused.
- 主要语言
- Rust
- 星标
- 1
- 派生
- 0
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
suradet-ps/codeframe 的其他 Issue
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 83/100
suradet-ps/codeframe#40 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
suradet-ps/codeframe#35 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 88/100
suradet-ps/codeframe#36 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
suradet-ps/codeframe#38 ·
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
suradet-ps/codeframe#30 ·
维护者通常 1 天内回复
查看 suradet-ps/codeframe 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
pop-os/cosmic-comp#2956 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:release criticality:p3 documentation
难度 2/5 1-3 小时 新手友好度 68/100
registrystack/registry-stack#2085 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
libp2p/rust-libp2p#6694 ·
维护者通常 1 天内回复