W3C home > Mailing lists > Public > public-html@w3.org > June 2011

[Bug 12949] New: click() shouldn't have special powers over dispatching click event manually

From: <bugzilla@jessica.w3.org>
Date: Mon, 13 Jun 2011 23:25:55 +0000
To: public-html@w3.org
Message-ID: <bug-12949-2495@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12949

           Summary: click() shouldn't have special powers over dispatching
                    click event manually
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: Olli.Pettay@gmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Right now the spec says that click() may cause the default action
to happen, but dispatching click manually doesn't have the same
effect.
I don't understand why. Gecko and webkit (if I read the webkit code correctly),
for example, seem to just dispatch click event when click() is called.
Default handling is bound to the elements in the event target chain through
which the event is dispatched. Default handling happens right after the event
has propagated through the chain.

Gecko has one special case for input.click() but I see that as a bug.

I see click() as a leftover from Netscape2/3/IE3 times, or as a 
helper method to dispatch untrusted click event.

(It is however clear that not all default handling should be
processed when handling untrusted event. Both click() and manual dispatching
do dispatch untrusted events.)

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Monday, 13 June 2011 23:26:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:33 GMT