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

Re: [whatwg] focus change inside keypress event handler

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 29 Oct 2009 19:16:50 -0700
Cc: "Michael A. Puls II" <shadow2531@gmail.com>, whatwg@whatwg.org, www-dom@w3.org
Message-id: <F7965E00-2B6F-4AAA-8078-1C9C13E6D4F8@apple.com>
To: Boris Zbarsky <bzbarsky@mit.edu>

On Oct 29, 2009, at 5:51 PM, Boris Zbarsky wrote:

> On 10/29/09 5:24 PM, Michael A. Puls II wrote:
>> I think so. The event target isn't changed by focus().
>> But, in Firefox, Safari and Opera, it's possible to change what  
>> element
>> the text is inserted into by changing the focus in 'keydown'.
> Right; that happens because the keydown and keypress events need not  
> fire on the same element and because the text entry is the keypress  
> default action.  In Gecko, that is.  I can't speak to Safari and  
> Opera.

WebKit also makes typing take effect as the default action for  
"keypress", at least for normal typing. It's more complicated when  
international text input methods are in play.

Received on Friday, 30 October 2009 02:17:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:15 UTC