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

Đang mở
#793 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
177
Fork
59
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

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

Đánh giá

Công nghệ
javascript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

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.