# Perspective - distinguish between single click and double click

**URL:** <https://forum.inductiveautomation.com/t/perspective-distinguish-between-single-click-and-double-click/65859>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [October 31, 2022, 5:25am UTC](https://forum.inductiveautomation.com/t/perspective-distinguish-between-single-click-and-double-click/65859 "2022-10-31T05:25:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [October 31, 2022, 5:25am UTC](https://forum.inductiveautomation.com/t/perspective-distinguish-between-single-click-and-double-click/65859/1 "2022-10-31T05:25:09Z")

</div>

I have a multi-zone conveyor displayed on my perspective view where a standard user can click to bring up a popup giving them control over that conveyor as a whole.

A maintenance user, when logged in, should be able to single-click on that conveyor to bring up the same popup, or double click on any one zone of that conveyor to bring up a popup with controls for that individual zone.

I can't just attach an onClick script or an onDoubleClick script to the zones, because the onClick script fires immediately without waiting to see if a second one is incoming. It seems that in Vision there is a `clickCount` property available for this application (ref: [Distinguish between single and double click](https://forum.inductiveautomation.com/t/distinguish-between-single-and-double-click/30719)), but it doesn't seem to exist in Perspective.

How can I achieve this in perspective?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 31, 2022, 9:31am UTC](https://forum.inductiveautomation.com/t/perspective-distinguish-between-single-click-and-double-click/65859/2 "2022-10-31T09:31:01Z")

</div>

`event.detail` inside the onclick event  
It will still trigger both event though...

You dont want something to have both a single and double click event  
Create a seperate button for the popup as a whole, you dont want popups to open on single click on an image. (unless that image looks like a button)

---

<div class="post-metadata">

**Author:** ![ASF](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ASF](https://forum.inductiveautomation.com/u/ASF)\
**Post date:** [November 2, 2022, 5:51am UTC](https://forum.inductiveautomation.com/t/perspective-distinguish-between-single-click-and-double-click/65859/3 "2022-11-02T05:51:23Z")

</div>

I've changed my approach to use a right click and context menu selection method. It's working but with a couple of fine tuning niggles that I've documented in a new thread [here](https://forum.inductiveautomation.com/t/building-a-context-menu/65970)
