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
Checking for other countries character type in onKeyDown #18
Comments
Do you have some idea how to fix this? I wonder if it can be generally checked if a printable character was pressed, without explicit testing of keyCode ranges. Do you have some clue how other scripts do this? |
I don't know the way to fix it clearly. but I added a code if keycode is 229. it works for me and most of windows user. you can search on google about the keycode 229. |
I've read about the 229 keyCode. It looks like a nice hack to use it but there might be various browser/OS inconsistencies. I would prefer more generic solution to find printable characters. I just had an idea that maybe I should move the "if" clause from the begining of onKeyDown to switch->default. You can find it here: https://gist.github.com/2935778 Could you please try to use it and let me know if it fixes your problems with typing Koeran chars? Please let me know when browsers/OS can you test. |
It's a solution , there's no more problem Korean chars. but it'll be better if you prevent to work some function key (F1 |
This change has broken my ability to put selects, like the following, in a cell: select id= "western_coastal" name="Western Coastal Region"> Now the code above shows up in the cell, instead of the select dropdown. |
You mean the change from the Gist above? I think you rather mean the change from issue #19 ? |
Oops. Yes, you are correct - from issue #19. |
@kimwz, you are probably right. check out the new revision of the Gist - https://gist.github.com/2935778/bab92801690261fef0424bb157a5193384cd5822 I returned to idea of whitelisting printable characters. This time I allow any character > 225. Could you also check it out on some Korean Mac? Do you think it would work on a Mac just as on Windows? |
I tested with my Mac and Windows. it's perfect on Windows. unluckily I saw new problem on Mac. it's probably selectionStart position problem. the problem is that cursor position is 0 when I typed a character in Korean. Cursor position must be "value.length". (in this case, must be 1) |
Thanks, that's something good to start with. It is suprising that text cursor is not at the end of textarea in Mac. The plugin does not do anything to move the cursor position. Does it behave correctly on Mac when you type a Latin (English) character? Could you maybe play with the code and propose a solution for the Mac issue? I don't have Mac system. |
luckily I found a answer about Korean chars on Mac problem. I think you can remove code like below if (useOriginalValue) { I think you don't have to clear editProxy value because there is "priv.editProxy[0].select();" |
Yes, technically you should be correct that But in fact, when you remove this line, it is easy to produce an en error when typing really fast. Try to press 1 then ENTER multiple times very fast. Then go back up and press 2 then ENTER multiple times (again very fast). You are likely to have a result similar to: Because of that, I think this is not a solution because it introduces other problems... Any other ideas maybe? |
@kimwz, finally I submitted a change that removes the below code according to your sugestion. /* Could you please test again and tell me if it helped for Korean chars in all browsers? |
I found an issue more
onKeyDown is checking only alphabet and some characters above all
there is no problem when typing in English
but it was not work for me when typing in Korean
The text was updated successfully, but these errors were encountered: