Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#37 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@AnushreeKasturi đang làm issue này rồi.

Từ ngày 18/10/2026.

  • #52 của @AnushreeKasturi — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust

Hướng nghiên cứu

Đọc crates/app/src/controls.rs:449-478, đặc biệt là trình xử lý nhập chiều rộng mục tiêu và liên kết prop:value của nó. Tái hiện vấn đề bằng cách nhập 1000 và kiểm tra thời điểm giá trị hiển thị thay đổi. Giữ nguyên giá trị thô trong khi nhập, giới hạn giá trị khi có thay đổi hoặc khi trường mất tiêu điểm, và xác minh rằng xóa trường vẫn vô hiệu hóa chiều rộng mục tiêu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
1
Fork
0
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của suradet-ps/codeframe

Tất cả issue của suradet-ps/codeframe

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.