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

オープン
#793 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。