InputNumber: "-" sign on empty input is ignored
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- react
- 領域
- frontend
調査の方向性
リンクされている CodeSandbox の再現環境と PrimeReact InputNumber の実装から始め、マイナスキーが押されたときの空の入力の処理に焦点を当てます。フィールドが「-」を保持し、0.00 を挿入せずにキャレットが末尾に残ることを確認し、その後、一覧にあるブラウザーとバージョンで期待される動作を検証します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When the InputNumber field is empty, focusing it and pressing the minus (-) key to enter a negative number causes 0.00 to be inserted automatically, and the caret jumps to the end of the input. As a result, it's impossible to enter a negative value directly. The user must first select and delete the entire 0.00 value and only then can enter a negative number.
I know that It worked correctly in PrimeReact v10.8.4.
Reproducer
https://codesandbox.io/p/sandbox/6h56ml
System Information
System:
OS: macOS 26.5
CPU: (10) arm64 Apple M4
Memory: 71.41 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.19.4 - /Users/{{username}}/.nvm/versions/node/v20.19.4/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.8.2 - /Users/{{username}}/.nvm/versions/node/v20.19.4/bin/npm
Browsers:
Brave Browser: 147.1.89.132
Chrome: 148.0.7778.216
Firefox: 149.0.2
Safari: 26.5
npmPackages:
primereact: 10.9.8 => 10.9.8
react: 18.3.1 => 18.3.1
Steps to reproduce the behavior
- Open reproducer. There will be an empty number input.
- Focus it and type "-"
Actual result: "0.00" appears in the input, caret stays in position after the decimal point
Expected behavior
"-" should be displayed in the input, caret stays at the end of the input
- 主要言語
- CSS
- スター
- 8.3k
- フォーク
- 1.2k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
primefaces/primereact のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
primefaces/primereact#8552 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
primefaces/primereact#8550 ·
-
Row checkbox selection tick is invisible in Landing Page Theme section対応中かも @Prakash1185 が 150 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
primefaces/primereact#8545 ·
-
Dependency conflict between jspdf v4 and jspdf-autotable during npm install対応中かも @Kamran92 が 165 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
primefaces/primereact#8537 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
primefaces/primereact#8551 ·
primefaces/primereact の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
area:frontend kind:bug priority:p1 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
PhyberApex/kuroshiro#1687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
microsoft/monaco-editor#5563 ·
メンテナーはふだん 1 日以内に返信