Skip to content
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

added patch to recognize some delimiter characters for soft keyboards #156

Closed
wants to merge 2 commits into from

Conversation

alanllamas
Copy link

added really simple patch to recognize some characters from soft keyboards, i hope this patch leads to a better solution, if you have some ideas and want me to implement them please contact me, i`d love to contribute

@i-like-robots
Copy link
Owner

Thanks for taking the time to submit this @alanllamas but I'm afraid I don't understand what the issue is and how this change might fix it.

The delimeterChars prop is intended to be an array of literal characters (KeyboardEvent.key). The delimeters prop is a list of key codes (which correspond to KeyboardEvent.keyCode).

Does configuring the either the delimeters or delimeterChars prop with the extra characters help you to achieve your task?

Or, have you found a problem with the timing of keyboard events from soft keyboards or an issue with key codes not always being the same?

@alanllamas
Copy link
Author

Im sorry i didn`t explain the issue, it happens that i couldn't recognize a keycode from soft keyboards, and always got 229, 0 or something like undefined or unassigned at code, keycode, and even charcode.

The solution was (and it is definitely just a patch) obtain the character tapped by the user and match it to an array, with hardcoded keycode values for every delimiter i needed, and passed another comparison to check if the value was at the delimiters prop that was being passed.

Most of all, it is a UX bug on mobile version because event keycodes doesn't match any character in mobile , so the only way to add a tag was addonBlur and you had to tap at the tag input again to submit another to the list.

It happens with android soft keyboards, was tested in browserstack and mobile devices on hand.

if you consider it something to fix, and this approach might solve it i can work on the patch so it becomes a complete solution for soft keyboard issues about keycodes.

i attache some links that show the issue in general:

https://stackoverflow.com/questions/36753548/keycode-on-android-is-always-229
https://bugs.chromium.org/p/chromium/issues/detail?id=118639
https://social.msdn.microsoft.com/Forums/en-US/d9ac5d52-55f5-4e8f-b074-22323834a09c/keydown-event-always-returns-keycode-229?forum=vssmartdevicesvbcs

@i-like-robots
Copy link
Owner

i-like-robots commented May 11, 2019

Thanks for the extra information @alanllamas, that's excellent. I'll try to get hold of a device to recreate this next week.

Would you mind creating a separate issue to track this problem?

I believe this is the same issue as initially reported in #97.

@i-like-robots
Copy link
Owner

Closing this in favour of #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants