W3C home > Mailing lists > Public > public-webapi@w3.org > September 2007

Re: DOM3 Key Events + accelerator keys

From: Oliver Hunt <oliver@apple.com>
Date: Tue, 25 Sep 2007 13:06:05 -0700
Message-Id: <BBB02592-CB1F-4B96-AF05-80D1E33A142E@apple.com>
Cc: public-webapi <public-webapi@w3.org>
To: Bjoern Hoehrmann <derhoermi@gmx.net>

> I can see no justification for what the Safari Beta does here in the
> specification (not generating key events for modifier key presses, and
> not generating a keyup event even though a key has been released). If
> you could tell me why this is a good choice and how you read the draft
> to suggest that this choice is also conforming, that would be great.
I was not saying this is correct behaviour, i was merely stating the  
behaviour of the 4 major browsers.

> Whether preventing the default action of any of the events during a
> CTRL+C combination will prevent the browser from copying the selected
> text into the clipboard is out of scope of the specification. As user
> I would find that annoying in most cases.
However a webapp may desire to implement copy/paste themselves, which  
would become difficult if they have to compete with the app.  And  
it's not just ctrl/cmd-c, it might be desired the ctrl/cmd-b be  
intercepted and blocked to prevent the insertion of bold text for  
example, and so on and so forth.

As it is currently the specification does not state whether  
preventDefault() on a keydown/press event will prevent the handling  
of accelerators, and there are justifiable arguments in either way:
  * Blocking app level accelerators such as ctrl/cmd-c, etc may annoy  
the user and/or interfere with their standard workflow
  * It makes logical sense for preventDefault on a keydown/press to  
prevent any side effects of pressing the key, that is textInput or  
accelerators, additionally the DOM already provides mechanisms to  
prevent other "standard" behaviour, eg. right-clicking a mouse can be  
completely blocked, removing the context menu from an element/page.

--Oliver

> -- 
> Björn Höhrmann · mailto:bjoern@hoehrmann.de · http:// 
> bjoern.hoehrmann.de
> Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http:// 
> www.bjoernsworld.de
> 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http:// 
> www.websitedev.de/
Received on Tuesday, 25 September 2007 20:06:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 December 2014 20:05:34 UTC