Git Product home page Git Product logo

Comments (14)

warpech avatar warpech commented on May 12, 2024

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?

from handsontable.

kimwz avatar kimwz commented on May 12, 2024

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.

from handsontable.

warpech avatar warpech commented on May 12, 2024

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.

from handsontable.

kimwz avatar kimwz commented on May 12, 2024

It's a solution , there's no more problem Korean chars. but it'll be better if you prevent to work some function key (F1F12) and windows key and others :) I tested for IE9(79mode) , Firefox, Crome latest version with Windows7
thanks a lot

from handsontable.

harrygates avatar harrygates commented on May 12, 2024

This change has broken my ability to put selects, like the following, in a cell:

select id= "western_coastal" name="Western Coastal Region">
option value="California">California
option selected="selected" value="Oregon">Oregon
option value="Washington">Washington
</select

Now the code above shows up in the cell, instead of the select dropdown.

from handsontable.

warpech avatar warpech commented on May 12, 2024

You mean the change from the Gist above? I think you rather mean the change from issue #19 ?

from handsontable.

harrygates avatar harrygates commented on May 12, 2024

Oops. Yes, you are correct - from issue #19.

from handsontable.

warpech avatar warpech commented on May 12, 2024

@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?

from handsontable.

kimwz avatar kimwz commented on May 12, 2024

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)

from handsontable.

warpech avatar warpech commented on May 12, 2024

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.

from handsontable.

warpech avatar warpech commented on May 12, 2024

@gatesh - please check my latest comment in issue #19

from handsontable.

kimwz avatar kimwz commented on May 12, 2024

luckily I found a answer about Korean chars on Mac problem. I think you can remove code like below

if (useOriginalValue) {
priv.editProxy.val(datamap.get(priv.selStart.row, priv.selStart.col));
}
/*
else {
priv.editProxy.val('');
}
*/

I think you don't have to clear editProxy value because there is "priv.editProxy[0].select();"
New issue on Mac will be solved when you remove that code

from handsontable.

warpech avatar warpech commented on May 12, 2024

Yes, technically you should be correct that select() removes the need of clearing the cell value.

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:

error.png

Because of that, I think this is not a solution because it introduces other problems... Any other ideas maybe?

from handsontable.

warpech avatar warpech commented on May 12, 2024

@kimwz, finally I submitted a change that removes the below code according to your sugestion.

/*
else {
priv.editProxy.val('');
}
*/

Could you please test again and tell me if it helped for Korean chars in all browsers?

from handsontable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.