jQWidgets Forums
jQuery UI Widgets › Forums › Lists › DropDownList › keyboard/keypad keycode from keydown
Tagged: DropDownList
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 11 years, 9 months ago.
-
Author
-
I checked to have the keyboard to work for my dropdownlist, and I found 2 issues:
For the keypad the returned keycode is incorrect with the keydown event. See: http://www.w3.org/2002/09/tests/keys.html
the keypress should be used
Also, if I use a specific type, with a display member that point to an integer, I have an exception saying toUpperCase does not exist for Object 1
In _getMatches, the following:
Hi calimero100582,
Please, do not paste code from the widget’s source in the Forum or anywhere else as this is in violation with our EULA. Regarding your suggestions about toString() – we will check that. Regarding the “keypress” – the current implementation of the widget is correct and it already takes into account whether Shift is pressed or not so the entered string is correct.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/in the event keydown, the keycode is not good for keypad/numpad, it is correct for the number above the letters, but not on the right.
if you check the link, you’ll see for the number above letters:
keydown (0): [keyCode: 49][shift: false][ctrl: false][alt: false][meta: false] keypress (1): [keyCode: 49][charCode: 49][character: 1][shift: false][ctrl: false][alt: false][meta: false] keyup (2): [keyCode: 49][shift: false][ctrl: false][alt: false][meta: false]
and for the numpad:
keydown (3): [keyCode: 97][shift: false][ctrl: false][alt: false][meta: false] keypress (4): [keyCode: 49][charCode: 49][character: 1][shift: false][ctrl: false][alt: false][meta: false] keyup (5): [keyCode: 97][shift: false][ctrl: false][alt: false][meta: false]
you’ll see the keyCode in keydown and keypress are different if we use the numpad
Hi calimero100582,
We will continue with our implementation and do not find necessary to change the event handling of the incremental search feature. Also note that ‘KeyPress’ is an event which is not fired for all keys in all browsers and in general is not a cross browser compatible JavaScript event.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ok,
As there is too much things I can’t work with, I’ll remove DropDownList then and use another tool
I have this fiddle to check back later if you change anything
thanks
Hi calimero100582,
Thanks for the sample.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.