W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [whatwg] set input.value when input element has composition string

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Wed, 2 Mar 2011 15:30:20 +0900
Message-ID: <AANLkTinWDcPhr_xMQYhU_cGQRjkN2wZRH+S=j5uX+Q1g@mail.gmail.com>
To: Makoto Kato <m_kato@ga2.so-net.ne.jp>
Cc: "Kang-Hao (Kenny) Lu" <kennyluck@w3.org>, WHAT Working Group <whatwg@whatwg.org>, WWW International <www-international@w3.org>, WebApps Working Group <public-webapps@w3.org>
On Tue, Mar 1, 2011 at 5:18 PM, Makoto Kato <m_kato@ga2.so-net.ne.jp> wrote:
>
> On Safari 5, even if textbox has IME composition string, text into textbox
> can be replaced by DOM/script.  But other browser's behaviors are different,
> and this is no specification when textbox has composition string.  Although
> IE, Chrome and Opera keep composition string after value is replaced by DOM,
> each behavior is different.
>
> This is the result for this test on each browsers.  When textbox has IME
> composition string such as ABCDEFG, then script (textbox.value = "123";) is
> called, textbox becomes...
>
> 1. "123ABCDEFG" (ABCDEFG keeps composition state and caret is after G).
> 2. "123" (composition string is removed).
> 3. "ABCDEFG" (ABCDEFG keeps composition state and caret is after G).
>
> Which behavior is right?  1 is Opera 11, 2 is Safari 5, and 3 is Chrome 10
> and IE9.
>

You must have tested Chrome improperly.  We currently have a bug in Chrome.
 To see the bug, open the attached test and type "nihao" with Chinese IME on
Windows or Mac.  Then press down array key.  The text is replaced by henhao
but "henha" is still marked and looks as if I'm compositing "henha" but if I
continue to type "ma" still with IME, then I observe that "henhaomao" is
shown inside the input element.  Once this bug is fixed, Chrome's behavior
should match that of Safari 5.

- Ryosuke


Received on Wednesday, 2 March 2011 06:32:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:43 GMT