This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27337 - For synthetic activation, should the original event still be dispatched?
Summary: For synthetic activation, should the original event still be dispatched?
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - UI Events (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-16 02:15 UTC by Manish Goregaokar
Modified: 2015-10-07 04:25 UTC (History)
5 users (show)

See Also:


Attachments

Description Manish Goregaokar 2014-11-16 02:15:53 UTC
"If the instance of the activation trigger is not an event of event type click (that is, when it does not result from a user's activation of a button or link using a mouse or equivalent pointing device), the implementation MUST synthesize and dispatch an event of event type click as one of the default actions of that activation trigger. The value of the Event.target MUST be set to the event target (normally, the currently focused element), and the event MUST simulate a left click (i.e., the MouseEvent.button attribute value MUST be 0, and the MouseEvent.buttons attribute value MUST be 1). Other context information of such a simulated click event is implementation dependent, but for historical purposes, the interface for the click event MUST be the MouseEvent interface, regardless of the actual device used to activate the element. Preventing the default action of the activation trigger, such as with the Event.preventDefault(), MUST stop the initiation of the activation behavior."

This isn't clear as to what we're supposed to do with the original event. 

For example, if the user hits enter on a form control, should we also dispatch keyboard events for the enter key, or only a mouse click event?
Comment 1 Anne 2014-11-17 13:05:12 UTC
Since it's triggered as the default action of the trigger (which is kind of bogus phrasing), the original event is assumed to be dispatched as well. But currently the way this text is written is indeed rather messy.
Comment 2 Manish Goregaokar 2014-11-17 13:07:29 UTC
If so, is there any order to it?

A synthetic click consists of the following:

 - Pre activation dispatch
 - Click dispatch
 - Post activation dispatch


The key event it originated from also has keyup/keydown/keypress. How do these interleave?
Comment 3 Arthur Barstow 2015-03-21 15:12:07 UTC
Bulk move of all D3E bugs to the UI Events component.
Comment 4 Gary Kacmarcik 2015-10-07 04:25:41 UTC
Now tracking as: https://github.com/w3c/uievents/issues/34