W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2009

Re: [whatwg] focus change inside keypress event handler

From: Thomas Broyer <t.broyer@gmail.com>
Date: Wed, 28 Oct 2009 10:01:46 +0100
Message-ID: <a9699fd20910280201h3c7990a1s7cb9a7e5dc2c60c1@mail.gmail.com>
To: "Michael A. Puls II" <shadow2531@gmail.com>
Cc: whatwg <whatwg@whatwg.org>, www-dom@w3.org
On Wed, Oct 28, 2009 at 2:43 AM, Michael A. Puls II
<shadow2531@gmail.com> wrote:
> (CCing DOM list just in case anyone there has any comments)
>
> With:
>
> <p><input onkeypress="this.nextSibling.focus()"><input></p>
>
> , if you type a character in the first field, should the character be
> entered in the second field or the first?
>
> In Firefox and Safari, it's the first field. In IE and Opera, it's the
> second.
[...]
> I do think FF and Safari's way makes more sense and I think most will agree.

If we consider keypress to be the same as DOM-3 Events' textinput,
then it makes way more sense for the char to be added to the first
field (i.e. the Gecko/WebKit way).

My .2c

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/
Received on Wednesday, 28 October 2009 09:02:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT