Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: Target width input clamps the value on every keystroke

未关闭 适合新手
#37 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@AnushreeKasturi 已经在做这个了。

开始于 2026年10月17日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

阅读 crates/app/src/controls.rs:449-478,重点查看目标宽度输入处理器及其 prop:value 绑定。输入 1000 重现问题,并检查显示值何时变化。输入时保留原始值,在值发生变化或字段失去焦点时进行限幅,并验证清空字段仍会禁用目标宽度。

由索引模型根据 Issue 内容生成。

描述

bug good first 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
  1. Open the app.
  2. Click the "Target width" input.
  3. 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

suradet-ps/codeframe 的其他 Issue

查看 suradet-ps/codeframe 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。