adopted-ember-addons / ember-keyboard

An Ember.js addon for the painless support of keyboard events
http://adopted-ember-addons.github.io/ember-keyboard/
Other
177 stars 57 forks source link

Cannot register handlers for : key #680

Open edwardhelsby-intercom opened 1 year ago

edwardhelsby-intercom commented 1 year ago

Handlers registered against : using the on-key helper do not work.

https://github.com/adopted-ember-addons/ember-keyboard/blob/933e1df4f27845b12b71bd2ed65c1f9d60790986/addon/src/utils/keyboard-listener.js#L24

let [eventType, keyCombo] = 'keyDown::'.split(':');
keycombo = ''
SergeAstapov commented 1 year ago

@edwardhelsby-intercom could you please provide some more info, e.g. how did you try to use the on-key helper and which arguments were provided?

edwardhelsby-intercom commented 1 year ago

Sure! within a template like so:

{{on-key ':' this.doThing}}

With that in the template, pressing : does not trigger this.doThing

SergeAstapov commented 1 year ago

@edwardhelsby-intercom could you please try ember-keyboard@8.2.0-unstable.56621f2 and confirm if it fixes an issue you reported?

I accidentally pushed the fix to the master branch instead of doing PR via https://github.com/adopted-ember-addons/ember-keyboard/commit/56621f210cf4ca8b7a8f914b90eecbeeb2dc8b86 🙈

edwardhelsby-intercom commented 1 year ago

@edwardhelsby-intercom could you please try ember-keyboard@8.2.0-unstable.56621f2 and confirm if it fixes an issue you reported?

I accidentally pushed the fix to the master branch instead of doing PR via 56621f2 🙈

Thanks for making that fix 🚀 I'm a couple of major versions behind so it may be a while before able to test that out