Re: ACTION-119: dblclick analysis

On May 6, 2006, at 4:18 PM, Bjoern Hoehrmann wrote:

>
> * Anne van Kesteren wrote:
>> Context Info is the same as for the click event, including  
>> UIEvent.detail
>> which returns the amount of subsequent clicks (not double clicks)  
>> taken in
>> account platform conventions. For example, on Windows it will go to 2
>> after 3 and on the Mac it will go to 4. So when dblclick is  
>> dispatched,
>> its UIEvent.detail says 2 (or a multiple of that, depending on the  
>> amount
>> of clicks you made and depending on platform conventions).
>
> Your test documents apparently never check dblclick.detail and this  
> does
> not describe how implementations currently behave; in Opera9 and  
> FF2 the
> dblclick.detail is always 2 as far as I can tell. I assume that's what
> the specification should say until someone objects...

It looks like Mac browsers are inconsistent on this. I used this test  
case:


<span ondblclick='document.getElementById("output").innerHTML +=  
"dbclick.detail: " + event.detail + "<br>"'
               onclick='document.getElementById("output").innerHTML  
+= "click.detail: " + event.detail + "<br>"'>
double click here</span>
<div id="output"></div>


Speed-clicking the span gave these results in Safari 2.0.3:

double click here
click.detail: 1
click.detail: 2
dbclick.detail: 2
click.detail: 3
click.detail: 4
dbclick.detail: 4
click.detail: 5
click.detail: 6
dbclick.detail: 6

These in Firefox 1.5.0.1:

double click here
click.detail: 1
click.detail: 2
dbclick.detail: 2
click.detail: 3
click.detail: 4
click.detail: 5
click.detail: 6

These in Opera 9 (Opera also appears to eat every third click,  
doesn't send either a click or dblclick event but does select the line):

double click here
click.detail: 1
dbclick.detail: 2
click.detail: 2
click.detail: 1
dbclick.detail: 2
click.detail: 2
click.detail: 1
dbclick.detail: 2

All browsers seem to agree that dblclick.detail should match  
click.detail for the corresponsing click event, although Opera does  
not appear to be following Mac platform conventions for click count,  
and Firefox does not appear to be following the proposed detail % 2  
== 0 rule on the Mac.

Regards,
Maciej

Received on Saturday, 6 May 2006 23:57:54 UTC