Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 433642

Summary: [GVT] "Incremental find" feature cannot handle Non-ASCII keywords correctly.
Product: [ECD] Orion Reporter: Sally Zhao <zxiaolin>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: camle, elijahe, ken_walker, libingw, takajo, zxiaolin
Version: 5.0   
Target Milestone: 6.0 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Wrong attachement, please ignore it.
none
Step4
none
Step5
none
Step6
none
Microsoft Pinyin_After press "1. 测试"
none
IME_Pinyin ABC
none
How to enable Unicode Input none

Description Sally Zhao CLA 2014-04-28 07:18:13 EDT
Test Environment:
OS: Windows 7 Chinese
Orion: https://orion.eclipse.org
Web browser: Firefox 24.4

Reproduced steps:
1. Login to Orion with user "gvttester3".
2. Create a file and input some Chinese characters with Chinese IME(Microsoft PinYin), e.g "测试", save.
3. Push Ctrl+J to enable incremental find on the editor.
4. Try to input the characters into incremental find field with Chinese IME.
5. The characters are input into not incremental find field but the file content.(#Problem)
6. Push Ctrl+J again, find keyword show in incremental find input field and the find feature was "partially" enabled, "partially" means can only find from the second matching string.
7. The find keywords in file content cannot be edit/delete.(#Problem)

Note:
The similar symptom can be reproduced with Japanese characters by GVT team.
Comment 1 Sally Zhao CLA 2014-04-28 07:19:30 EDT
Created attachment 242391 [details]
Wrong attachement, please ignore it.
Comment 2 Sally Zhao CLA 2014-04-28 07:24:41 EDT
Created attachment 242392 [details]
Step4
Comment 3 Sally Zhao CLA 2014-04-28 07:26:41 EDT
Created attachment 242393 [details]
Step5
Comment 4 Sally Zhao CLA 2014-04-28 07:27:10 EDT
Created attachment 242395 [details]
Step6
Comment 5 libing wang CLA 2014-04-28 08:51:50 EDT
I could reproduce it in FF 28 for both Chinese and Japanese. The results are slightly different.
However in Chrome 35, both Chinese and Japanese worked well.

Silenio, lemme know if you need help on reproduce it.
Comment 7 Ken Walker CLA 2014-04-30 10:42:23 EDT
This fix has been deployed to orion.eclipse.org
Comment 8 Sally Zhao CLA 2014-05-03 22:37:32 EDT
Verified on orion.eclipse.org, cannot get the fully fix. Please check the investigation below:

1. English keyword:
Click Ctrl+J, input "a" as the keyword.
#Result: This keyword "a" was input into the Incremental find field, the first "a" in file content can be found and highlight.

2. Chinese keyword:
Case 1
a. Click Ctrl+J, type "ceshi" with IME "Microsoft Pinyin", press "1" to select "1.测试". 
#Problem: The keyword "测试" show in the file content.
b.Press "Enter", the keywords were input into Incremental find field, and the find result was correct.

Case 2
a. Click Ctrl+J, type "ceshi" with IME "Microsoft Pinyin ABC", press "Space" key then press "1" to select "1.测试". 
#Problem: The keyword "测试" show in the file content.
b. Click Ctrl+J again.
#Problem: The keywords were input into Incremental find field, but the first matched string was skipped and the second one was highlight.
Comment 9 Sally Zhao CLA 2014-05-03 22:39:33 EDT
Created attachment 242671 [details]
Microsoft Pinyin_After press "1. 测试"
Comment 10 Sally Zhao CLA 2014-05-03 22:41:35 EDT
Created attachment 242672 [details]
IME_Pinyin ABC
Comment 11 Silenio Quarti CLA 2014-05-05 12:54:00 EDT
(In reply to Sally Zhao from comment #8)
> Verified on orion.eclipse.org, cannot get the fully fix. Please check the
> investigation below:
> 2. Chinese keyword:
> Case 1
> a. Click Ctrl+J, type "ceshi" with IME "Microsoft Pinyin", press "1" to
> select "1.测试". 
> #Problem: The keyword "测试" show in the file content.
> b.Press "Enter", the keywords were input into Incremental find field, and
> the find result was correct.

This is not a problem.  It is just the way the IME works.  The input is not committed so it shows where the caret is (div in focus).   The characters will only move to the incremental field status when the input is committed.  See bug#406785 for more info on this.


> Case 2
> a. Click Ctrl+J, type "ceshi" with IME "Microsoft Pinyin ABC", press "Space"
> key then press "1" to select "1.测试". 
> #Problem: The keyword "测试" show in the file content.
> b. Click Ctrl+J again.
> #Problem: The keywords were input into Incremental find field, but the first
> matched string was skipped and the second one was highlight.

This is fixed with

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7bcabd280e2165c1ba6476124b422a986604752d
Comment 12 Sally Zhao CLA 2014-05-06 02:28:32 EDT
Below is the symptom update from GVT team, I tried Chinese characters with IE and Google Chrome, got the same result. 
*****************************************************************************
On Chrome,
Downloads page is opened in a new tab after input keyword and type Ctrl+J. To avoid this, click other place before typing Ctrl+J.
On IE,
This is more critical. Inputted keyword remains in the editor and different word is highlight.
*****************************************************************************


Also please note in my Comment 8, this is the status using FF.
--------------------------------------------------------------------------------
2. Chinese keyword:
  Case 1
  a. Click Ctrl+J, type "ceshi" with IME "Microsoft Pinyin", press "1" to select  "1.测试". 
  #Problem: The keyword "测试" show in the file content.
  b.Press "Enter", the keywords were input into Incremental find field, and the find result was correct.
--------------------------------------------------------------------------------

When I used the browser Google Chrome, at the last step:
Press "Enter", the keywords will be input into both Incremental find field and the file content field.
Comment 13 Sally Zhao CLA 2014-05-13 21:45:59 EDT
Reopen for not fully fixed.
Comment 14 Silenio Quarti CLA 2014-05-15 11:24:23 EDT
(In reply to Sally Zhao from comment #12)

> On Chrome,
> Downloads page is opened in a new tab after input keyword and type Ctrl+J.
> To avoid this, click other place before typing Ctrl+J.


I have not been able to reproduce this problem. Please provide more details.  The download page will open if the editor is not in focus. Is that the case?


> On IE,
> This is more critical. Inputted keyword remains in the editor and different
> word is highlight.


This should be fixed with: 

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cfafb5f11671cf227249b5d8d9eace7b914e84b1

Please try the latest.


> 
> Also please note in my Comment 8, this is the status using FF.
> -----------------------------------------------------------------------------
> ---
> 2. Chinese keyword:
>   Case 1
>   a. Click Ctrl+J, type "ceshi" with IME "Microsoft Pinyin", press "1" to
> select  "1.测试". 
>   #Problem: The keyword "测试" show in the file content.
>   b.Press "Enter", the keywords were input into Incremental find field, and
> the find result was correct.
> -----------------------------------------------------------------------------
> ---
> 
> When I used the browser Google Chrome, at the last step:
> Press "Enter", the keywords will be input into both Incremental find field
> and the file content field.


As I mentioned in comment#11, the inputted text will show in the editor until it is committed (since the editor DIV has the focus/caret).  There is nothing we can do about it.
Comment 15 Akihiko Takajo CLA 2014-05-16 03:55:58 EDT
I tested with Japanese IME on Windows Japanese.
It works as expected.
Comment 16 Sally Zhao CLA 2014-05-16 07:00:13 EDT
Incremental find can work well with:
1) "Microsoft Pinyin Input"+IE
2) "Microsoft Pinyin Input"+FF
3) "Microsoft Unicode Input"+FF

The problematic syptom are:
1) "Microsoft Unicode Input"+IE
a. Login to Orion, open the file "中文测试字符" under the first folder with IE.
b. Press "Ctrl+J", input "3401" with "Microsoft Unicode Input", the keyword was input into file content instead of commiting into incremental find field.
2) "Microsoft Pinyin Input"+Chrome
a. Login to Orion, open the file "中文测试字符" under the first folder with Chrome.
b. Press "Ctrl+J", input "ceshi" with "Microsoft Pinyin Input", the keyword was input into both file content and incremental find field.
c. After that, only moving the cursor to any other place in this file content, the keyword can be committed.
3) "Microsoft Unicode Input"+Chrome

Note: To type GB18030 characters, "Microsoft Unicode Input" is required. To enable this IME, change to "Microsoft Pinyin Input" first, then select "Option Menu->Secondary Input->Unicode Input".
Comment 17 Sally Zhao CLA 2014-05-16 07:00:57 EDT
Created attachment 243166 [details]
How to enable Unicode Input
Comment 18 John Arthorne CLA 2015-05-05 14:43:54 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html