patch: click event handling

Maciej Stachowiak mjs at apple.com
Wed Oct 29 09:13:43 CET 2003


On Oct 29, 2003, at 12:06 AM, Lars Knoll wrote:

> On Wednesday 29 October 2003 07:49, David Faure wrote:
>> On Tuesday 28 October 2003 23:25, Maciej Stachowiak wrote:
>>> Here's a patch to make click handlers added w/ addEventListener work
>>> right for form controls.
>>
>> Thanks, I'll have a look.
>
> This should mostly work already in HEAD, since we now send the mouse 
> and key
> events through the DOM for most form elements (not for <textarea> 
> though).

In the WebCore tree, we send all mouse down events through the DOM 
first before delivering to the widget, but buttons and text fields go 
into a modal event tracking loop on mouse down. The AppKit button 
control does this for click tracking, so that mousing down in the 
button, moving the mouse out of it, and releasing the mouse does not 
count as a click. The text field does it in case you're going to start 
a drag. In both these cases, we deliver the mouse up and the click on 
return from the modal loop.

Regards,
Maciej



More information about the Khtml-devel mailing list