W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

RE: Last Call Issues for WD-DOM-Level-3-Events

From: Brad Pettit <bradp@microsoft.com>
Date: Fri, 15 Aug 2003 18:03:09 -0700
Message-ID: <3013537455C0D1459746B2AE2DF47AEA0BD39DD1@svc-msg-01.northamerica.corp.microsoft.com>
To: "Philippe Le Hegaret" <plh@w3.org>
Cc: "WWW DOM" <www-dom@w3.org>

This seems like a contradiction:

You say the following was added to the spec:

	If cancelled (Default actions and cancelable events), 
	a keydown cannot contribute to the generation of text events.

And then you state:

	Applications should not assume that the keydown or keyup will
contribute to the text event generation.


By stating that a cancelled keyDown CANNOT contribute to the generation
of a text event, you are suggesting that it DOES contribute to a text
event because changing the key down controls whether the text event will
fire.

Additionally, one situation where this could be a problem is a modifier
key. If one cancels the keydown of a modifer key, but then does not
cancel the keyDown for an alpha-numeric key following it, the cancelled
modifier key would still probably contribute to the character generated
by the system, and there may be no reasonable way to change that.

That's why I was suggesting key events should be as detached from
textEvents as possible. Cancelling a key event should have no relation
to the generation of the text event, just as cancelling a keyDown event
may have no relation to the generation of a keyUp event. The generation
of text should not be assumed as the default action of the keyDown.

--Brad

-----Original Message-----
From: Philippe Le Hegaret [mailto:plh@w3.org] 
Sent: Friday, August 15, 2003 4:58 PM
To: Brad Pettit
Cc: WWW DOM
Subject: RE: Last Call Issues for WD-DOM-Level-3-Events


On Thu, 2003-07-24 at 12:49, Brad Pettit wrote:
> >>Let us know if you are satisfy or not
> 
> I'm not satisfied. I believe it is a mistake to create such a tie 
> between Keyboard events and Text events. Whether a particular device 
> generates a specific character code in response to one, two, or a 
> thousand keydown/keyup events should have no bearing on what text 
> event is generated.

Keyboards are generating text, so tying the keyboard events to the text
events do make sense. The reverse would certainly not be appropriate. We
removed the previous added section and added the following description
to the definitions of keydown and keyup: [[ If cancelled (Default
actions and cancelable events), a keydown cannot contribute to the
generation of text events. Whether a keydown contributes or not to the
generation of a text event is implementation dependent. ]]

>  By tying the cancelling of a keyboard event to the (non-)generation 
> of a text event encourages assumptions regarding event ordering.
> One should not assume ordering of keyboard events in
> relationship to the textEvent. Since it would be possible for a
> developer to cancel the text event itself, there is no need to specify
> that cancelling the keyboard event should affect whether a text event
is
> generated.

Applications should not assume that the keydown or keyup will contribute
to the text event generation.

Does this change resolve your issue?

Philippe
Received on Friday, 15 August 2003 21:03:20 GMT

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