Last Comment Bug 664364 - Entering newline after Japanese in a textarea doesn't change cursor position
: Entering newline after Japanese in a textarea doesn't change cursor position
Status: RESOLVED FIXED
: inputmethod
Product: Core
Classification: Components
Component: Widget: Android (show other bugs)
: Trunk
: ARM Android
: -- normal with 1 vote (vote)
: mozilla8
Assigned To: Makoto Kato [:m_kato]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-14 22:27 PDT by mark hosang
Modified: 2011-10-28 15:57 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
fix (885 bytes, patch)
2011-07-20 01:38 PDT, Makoto Kato [:m_kato]
nchen: review+
mark.finkle: approval‑mozilla‑aurora+
Details | Diff | Review

Description mark hosang 2011-06-14 22:27:02 PDT
User-Agent:       Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: Mozilla/5.0 (Android; Linux armv7l;rv2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1

When typing in a textarea with the Japanese keyboard set to 「あ」, if you enter in a Japanese word followed by a newline, the newline gets inputted into the textarea, but the cursor doesn't move to the newline.  That is to say, the cursor is still located at the end of just entered Japanese word.

Reproducible: Always

Steps to Reproduce:
1.Click on textarea to bring up keyboard
2.Make sure input mode is set to あ
3.input "k" "e" "n"
4.Select any option available, in my case けんめい
5.Hit the return key (will cause select options to disappear)
6.Hit the return key again


Actual Results:  
Cursor fails to update position to after the newline.

Expected Results:  
Cursor moves to next line after the newline

This is reproducible on both the Galaxy S 2.3.3, Galapagos 2.2.1, Galaxy Tab 2.2 in the firefox add-on.

This is NOT producible in the native browser (devkit?). 

This is also producible when inputting english via the Japanese 「あ」keyboard.
Comment 1 Makoto Kato [:m_kato] 2011-06-15 00:22:40 PDT
mark, although I cannot reproduce this on Nightly, could you reproduce this using Nightly build?  You can get it from http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-central-android-r7/
Comment 2 mark hosang 2011-06-15 00:56:48 PDT
Hi Kato-san,
   I just installed the nightly and the bug still exists.

here is a site you can try. 
http://www.w3schools.com/tags/showit.asp?filename=tryhtml_textarea

the key is that you have to enter in a word in Japanese first for the newline to stop working.  To reiterate, if you just click on the textarea while in the kana keyboard mode, you'll be able to enter in newlines.  However, just entering just one word like "kanari" you won't be able to get the cursor to move for any subsequent newline.
Comment 3 Makoto Kato [:m_kato] 2011-06-19 22:12:28 PDT
Thanks, Mark.  Confirmed on latest nightly
Comment 4 Makoto Kato [:m_kato] 2011-06-19 22:16:52 PDT
Also, This can reproduce on iWnn, but if using ATOK, it is no problem.
Comment 5 Makoto Kato [:m_kato] 2011-07-20 00:49:19 PDT
When reproducing this, setComposionText() is called.  Since Gecko detects that composing is started, so caret isn't updated.

I believe that this is an iWnn bug, but we should fix this.
Comment 6 Makoto Kato [:m_kato] 2011-07-20 01:38:44 PDT
Created attachment 547006 [details] [diff] [review]
fix
Comment 7 Jim Chen [:jchen] [:darchons] 2011-07-21 15:02:25 PDT
Comment on attachment 547006 [details] [diff] [review]
fix

># HG changeset patch
># Parent f649b717749526de2b831cb471906532689ed0e3
>
> 
>         if (!mComposing) {
>+            if (mComposingText.length() == 0) {
>+              // Some IMEs such as iWnn sometimes call with empty composing 
>+              // text.  (See bug 664364)
>+              // If composing text is empty, ignore this and don't start
>+              // compositing.
>+              return true;
>+            }
>+
>             // Get current selection
>             GeckoAppShell.sendEventToGecko(
>                 new GeckoEvent(GeckoEvent.IME_GET_SELECTION, 0, 0));

Can you change indent to 4 spaces? Thanks.
Comment 9 :Ehsan Akhgari (out sick) 2011-07-22 14:15:16 PDT
http://hg.mozilla.org/mozilla-central/rev/57d55c25dbe4
Comment 10 mark hosang 2011-07-24 18:29:15 PDT
Thanx Makoto this fixed our problem.
Comment 11 Makoto Kato [:m_kato] 2011-07-24 19:10:09 PDT
Comment on attachment 547006 [details] [diff] [review]
fix

requesting for Firefox 7.  This bugs occurs with iWnn that installed into most devices in Japanese devices.
Comment 13 Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-10-28 15:57:23 PDT
Hrm.  It appears that you can install the iWnnIME on Android if your phone is rooted :
http://my.opera.com/wiz/blog/2009/06/16/how-to-install-japanese-ime-on-android

Note You need to log in before you can comment on or make changes to this bug.