-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
key attribute of x-shortcut conflicts with react's key attribute #29
Comments
The current declarative API feels a bit awkward, I think I should change it to something like this: <x-shortcut value="Control+Shift+A"></x-shortcut> where the value can consist from any key names defined in https://www.w3.org/TR/uievents-key/, separated by "+" sign. I will fix it later this week as I have quite a lot of code relying on the current API. BTW, is there a list of other attributes that have special meaning in React? |
Cool, thanks.
Not that I am aware of. Some work differently, but this shouldn't be a problem: https://facebook.github.io/react/docs/dom-elements.html. With the key attribute the problem is, that react omits it |
I have changed the API to |
@rockiger This should be now fixed in version 0.0.48. |
Works like a charm now! Thanks a lot! |
How do you use it in React? What do I need to import from xel to make it work? |
@a-y-u-s-h Please check the instructions on https://xel-toolkit.org/setup |
It seems to me, that the key attribute for the x-shortcut is "misread" by react as an identification key. This way I can't display shortcuts correctly. I can only display the modifiers, but the character of the shortcut is not shown (see picture).
Is it possible to rename the key attribute to char or val?
FYI, I am not using react directly, but with Clojurescript and Reagent. IMO the problem should persist with JSX.
The text was updated successfully, but these errors were encountered: