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

problem using other language #839

Closed
Hokwang opened this issue Jun 27, 2013 · 69 comments
Closed

problem using other language #839

Hokwang opened this issue Jun 27, 2013 · 69 comments
Assignees
Milestone

Comments

@Hokwang
Copy link

Hokwang commented Jun 27, 2013

Hello.

First of all, I am Korean.
I am trying to using this cool plugin.
When I input Korean in a cell, first character presents English always.

For example, I wanna write "한글", but the cell present "gㅏㄴ글".
"아이" -> "dㅏ이".
"도시" -> "eㅗ시".

Please fix it or answer to me how solve this problem.
Thank you.

@setthase
Copy link

Well - this will be really hard to fix, because we don't know how to write in Korean. But we will be grateful if you can write a pull request for this (with a proper tests).

@Hokwang
Copy link
Author

Hokwang commented Jun 28, 2013

If you use english, install korean or japanese (whatever 2byte language).
and then change the language installed.

At your home page (http://handsontable.com/index.html),
click A6 cell and write "aaa" and enter key.
and write "bbb" and enter key.
and write "ccc and enter key.

you will see "aaa" -> "aㅁㅁ" ( in this case user want to write "ㅁㅁㅁ")
"bbb" -> "bㅠㅠ"
"ccc" -> "cㅊㅊ"

Thank you.

@psmolenski
Copy link
Contributor

@Hokwang, could you pleas test if my latest fix solves the problem with korean characters?
https://github.com/psmolenski/jquery-handsontable/commit/75b6534b5b133fc511778bb23bf2952642a3661c

@Hokwang
Copy link
Author

Hokwang commented Sep 3, 2013

@psmolenski Sorry for late. The link has a problem, please check your link

@psmolenski
Copy link
Contributor

My fix has been merged into one of the recent version of Handsontable. Please use the latest version (0.9.16) and let me know if the problem still occurs.

@Hokwang
Copy link
Author

Hokwang commented Sep 4, 2013

@psmolenski yes, still not fixed.

@okjesse
Copy link

okjesse commented Sep 7, 2013

@psmolenski seems not fixed in 0.9.17

@Hokwang
Copy link
Author

Hokwang commented Sep 26, 2013

@psmolenski still not fixed, 0.9.18

@psmolenski
Copy link
Contributor

What about 0.10.x-beta?

@Hokwang
Copy link
Author

Hokwang commented Oct 7, 2013

@psmolenski Did you test? I tested using 0.10.0-beta1. problem is still not fixed. Please install other language in your OS and test it.

@psmolenski
Copy link
Contributor

Which OS are you using @Hokwang ?

@Hokwang
Copy link
Author

Hokwang commented Nov 14, 2013

@psmolenski I am using Windows 7.

@okjesse
Copy link

okjesse commented Dec 2, 2013

@psmolenski the problem is happened from version 0.7.5,seems still not fixed in the nearest version

@lauzi
Copy link

lauzi commented Dec 2, 2013

Chinese has the same issue. Chinese IDEs take multiple keys as input and outputs Chinese words in return, ex: jitui -> 雞腿. But when I write jitui, the j is consumed by handsontable and the IDE only gets itui. Without the j, the IDE translates itui to some random shit that I totally did not want to write.
Below is a Chrome extension which is an IDE that can be used to reproduce this bug.
https://chrome.google.com/webstore/detail/google-input-tools/mclkkofklkfljcocdinagocijmpgbhab
Thank you.

@skyand96
Copy link

I also have the same problem in v0.10.3 (OS : Windows 7 sp1)

@jimmykwong
Copy link

@psmolenski I found this issue may be cause by this function.
AutocompleteEditor.prototype.updateChoicesList = function (choices) {
this.$htContainer.handsontable('loadData', Handsontable.helper.pivot([choices]));

var value = this.getValue();
var rowToHighlight;

if(this.cellProperties.strict === true){

  rowToHighlight = findItemIndexToHighlight(choices, value);

  if ( typeof rowToHighlight == 'undefined' && this.cellProperties.allowInvalid === false){
    rowToHighlight = 0;
  }

}

if(typeof rowToHighlight == 'undefined'){
  this.$htContainer.handsontable('deselectCell');
} else {
  this.$htContainer.handsontable('selectCell', rowToHighlight, 0);
}

this.focus();

};
While updating the choiceslist , it will highlight the row which the value is contained in choiceslist,and the focus is on the highlight row.And then it must focus on the textarea to input the other character.
So I Suspected the issue was caused by the change of focus, I just kept the first line of the function and removed all others, and I found it work.
#1225 and #1289 were caused by the same reason ,I think.
thank you!

@hyvaa
Copy link

hyvaa commented Jul 24, 2014

Using 0.10.0-beta4,
Same problem occurs on Chrome/ Windows 8, IE10/Windows7
But works well on IE11 / Windows8 and Windows7
(Korean letter)

@withchandra
Copy link

I made a simple modification, and it works at least with Japanese characters.
I am not sure it will affect other functions or not.
Inside the jquery.handsontable.full.js

   /**
   * Listen to document body keyboard input
   */
  this.listen = function () {
    Handsontable.activeGuid = instance.guid;

    if (document.activeElement && document.activeElement !== document.body) {
      //document.activeElement.blur();
    }
    else if (!document.activeElement) { //IE
      //document.body.focus();
    }
  };

I commented those two lines.
Please let me know if it will affect other functions.
Thank you

@ustb-zz
Copy link

ustb-zz commented Dec 12, 2014

christchan's modification works well on Chrome, but not work on IE11 and Firefox34

@ustb-zz
Copy link

ustb-zz commented Dec 26, 2014

I find a solution to fix the bug.

version:0.12.2

line:3935
old:eventManager.addEventListener(document, 'keydown', function (ev){
new: eventManager.addEventListener(document, 'keyup', function (ev){

line:1199 comment
line:1202 comment

@xshadows
Copy link

xshadows commented Jan 9, 2015

@christchan this solve the IME problem ,but copy and paste function won't work well,it's weird

@awsp
Copy link

awsp commented Apr 15, 2015

Is there any follow-up on this issue?
For Japanese IME at least, I think if it does beginEditing() opening up the textarea before keydown will solve the problem of having unintended ASCII character from appearing. Since IME input works no problem when editor textarea is opened.
The problem seems to me is that the first "key" that triggers the editor to open incorrectly. Should open with empty textarea first basically. :D

Edit: (Jun 3, 2015)
Some follow up:
Starting from 0.15.0-betaX, on a Mac, when I press the Command key before typing, the Japanese and Chinese (Cangjie) IME start to work correctly.

Not so sure about Windows yet.

Edit: (June 26, 2015)
As of version 0.15.1, the issue still exists, similar to 0.15.0-betaX.

Edit: (July 22, 2015)
version 0.16.0, the issue still exists

@teegh
Copy link

teegh commented Jul 23, 2015

It seems not fixed in 0.16.0.

I think the following problems can be solved.

  • A problem that occurs when i use the ime in google chrome.
  • A problem that occurs when i use the ime in handsontable's autocomplete.

In order to avoid the bug, i changed the code below. handsontable.full.js

line 6509

function init() {
    instance.addHook('afterDocumentKeyDown', onKeyDown);
    //eventManager.addEventListener(document.documentElement, 'keydown', function(event) {
    eventManager.addEventListener(document.documentElement, 'keyup', function(event) { //keydown -> keyup
      instance.runHooks('afterDocumentKeyDown', event);
    });

line 6902

AutocompleteEditor.prototype.open = function() {
...
  //this.focus(); //comment

line 6967

AutocompleteEditor.prototype.updateChoicesList= function() {
...

  // this.instance.listen(); //comment
  // this.TEXTAREA.focus(); //comment

@AMBudnik
Copy link
Contributor

AMBudnik commented Dec 6, 2017

I am really happy to have this old issue solved!

Can I count on your feedback regarding testing the fix
@Hokwang @okjesse @lauzi @skyand96 @jimmykwong @hyvaa @christchan @ustb-zz @xshadows @pansinm @cqcn1991 @minteliuwm @Zneiat

@awsp @teegh @zhouxiaoping @ruzia @minipai please also try the original fix

@ChouGary @farthinker @kazuma1989 @gwajanara thank you for your feedback

@ChouGary
Copy link

ChouGary commented Dec 7, 2017

thank your hard work ,test with 0.35.0
i want to correct the error press esc, first word is english.

here is my steps to reproduce issue
1.use chinese IME type word 中文字
2.press 「esc」 because i want to correct chinese word
3.use chinese IME type word 中文輸入法

here is video for reference
https://drive.google.com/file/d/1sSxFrZ91TZHSEBlC5y_MyoxHy0L4awbR/view

@awsp
Copy link

awsp commented Dec 7, 2017

@AMBudnik
I could verify Japanese IME works on the new release, 0.35.0, on both macOS and Windows' Chrome.

For Chinese IME (Cangjie), it only works on Chrome 62/63 but does not work on Safari 11.
First character disappeared in Safari 11, therefore the Chinese word was input incomplete.

@AMBudnik
Copy link
Contributor

AMBudnik commented Dec 8, 2017

Thank you very much for feedback @ChouGary and @awsp
we'll investigate it

ps. @budnix just posted it at #4661

@AMBudnik
Copy link
Contributor

AMBudnik commented Dec 8, 2017

@ChouGary Can you tell me the English letter formula for the two of the words 中文字 and 中文輸入法?

@ChouGary
Copy link

ChouGary commented Dec 8, 2017

@AMBudnik
i can use esc to reproduce issue in Chinese IME (Pinyin Cangije)
1 enter editing mode
image
2 press 「esc」key for exit editing mode
image
3,use Chinese IME (Pinyin Cangije)
first word is english,second word is Cangije code
image

@budnix
Copy link
Member

budnix commented Dec 8, 2017

@ChouGary I've reproduced the bug, thanks. I've created a separated issue about this at #4662.

@AMBudnik
Copy link
Contributor

AMBudnik commented Dec 8, 2017

Hi guys! I have one request for you.

Yesterday we have added Internationalization and it would be great if you could share us some feedback. I'd be more than happy to see transactions for Chinese, Korean and Japanese.

postgetme added a commit to postgetme/react-handsontable that referenced this issue Dec 16, 2017
postgetme added a commit to postgetme/react-handsontable that referenced this issue Dec 16, 2017
@tacnoma
Copy link

tacnoma commented Dec 25, 2017

Hi guys, I tried ver. 0.35.0 to solve this issue and it seems working well.
I am so grateful for the many efforts.

But unfortunately, I found that this issue reproduced with copyPaste: false option.
To confirm, try this jsfiddle. https://jsfiddle.net/tacnoma/ux9at5wx

My environment is

  • Handsontable: 0.35.0
  • browser: Chrome 63
  • OS: Mac OS X 10.12.6
  • IME: Google Japanese Input 2.20

This is just a report, and I have not found the cause of this problem, sorry.

@AMBudnik
Copy link
Contributor

AMBudnik commented Jan 2, 2018

Hi @tacnoma

thank you for reporting., Can I ask you to create a new issue for this bug? It will be much easier to attach new commits to it.

@tacnoma
Copy link

tacnoma commented Jan 6, 2018

@AMBudnik
thank you, I created #4704.

@AMBudnik
Copy link
Contributor

AMBudnik commented Jan 8, 2018

Thanks @tacnoma
I saw that @budnix has already connected it to another issue.

@AMBudnik
Copy link
Contributor

Hi Guys!
@Hokwang @skyand96 @hyvaa @gwajanara

We've just got a translation for Korean. If you could share your opinion on the translation that would be able to pull the Korean language to our official version of Handsontable! You can find it at #5355

@moonjoungyoung
Copy link

@AMBudnik

Hello.
It seems not fixed in mobile. (or chrome inspect mobile version)
In official demo, desktop works fine, but mobile is not.

https://handsontable.com/examples?headers

@AMBudnik
Copy link
Contributor

Hi @moonjoungyoung could you please paste a screen recording where this issue is replicable?

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

No branches or pull requests