adopted-ember-addons / adopted-ember-addons/ember-keyboard
Key sequence specs appear to be case-sensitive in test helpers, but not in `on-key` modifier
- 主要言語
- JavaScript
- スター
- 177
- フォーク
- 59
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I was defining an `{{on-key "Shift+Enter" this.someCallback}}` in my app code, which worked fine. But then when I went to make an acceptance test and added `keyDown("Shift+Enter")`, this would not fire the callback.
I tried changing it to `keyDown("shift+enter")` in the test and this still didn't work.
Finally, I made both specify in all lowercase, `{{on-key "Shift+Enter" this.comeCallback}}` in the template and `keyDown("shift+enter")` in the test and now it does trigger the callback.
I know this now and can work around it, but it doesn't seem like intended behaviour to me. It would be ideal if both parts behaved the same, case-insensitive way, but I'd be just as happy if all lowercase were required in both contexts and this were documented/enforced with a warning.
コントリビューションガイド
調査の方向性
Start by locating the `on-key` modifier and the acceptance-test `keyDown` helper; the issue does not name specific files or tests. Compare how each handles `Shift+Enter` versus lowercase input, then verify the reported reproduction with both forms. Done means the two entry points behave consistently or the required casing is documented and enforced.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100