Touch Event `detail` property

I noticed in the Properties specification for
touchmove and the other touch events that there is this mysterious property called details of type “long (float)” whose entire description is listed as “0.” I can’t find any reference to such a property in the W3C spec but it does indeed appear to have been added to both Webkit and Gecko. Does this property serve any purpose? If so, can it be documented? If not, can it be removed?

Since TouchEvent is based on UIEvent, the detail property is inherited from that. It doesn’t actually apply to touchmove and the doc should say so.

If it applies to touch events at all (and I’m not sure it does), it would apply to touchend, most likely, to indicate if a double-tap was detected, but even that is up in the air since I’m not sure these events are really able to be used that way.

I’m looking through code and asking some questions now.

Sheppy

So, I would go by what’s stated on the article about UIEvent.detail, which is where this property comes from: https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail

I’m revising the information on the touch event pages to clarify this.

Sheppy

I’ve overhauled the content of the touch event pages a bit to clarify some things. Hopefully it helps!

Ah, that explains it. Thanks!

Hi,
Details is a list element. The

element allows you to add some content inside it and you have an accessible expand-for-more interaction:

[https://codepen.io/jrohatiner/pen/VxBrmV](http://details element)

[https://css-tricks.com/quick-reminder-that-details-summary-is-the-easiest-way-ever-to-make-an-accordion/#article-header-id-0](http://Browser support details)

@jrohatiner – We’re talking about the UIEvent.detail property though,
not the <detail> element in this case. But thanks for those links! I
liked the examples!

Hi Eric,
My mistake! I guess that’s what happens when I get in the TL;DR mode. Is there a TL;RA (read anyway)? lol. Thanks for pointing that out :slight_smile:

1 Like