# Hidden objects are clickable

**URL:** <https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611>\
**Category:** Online experiments\
**Tags:** mouse, online\
**Created:** [June 17, 2021, 6:01pm UTC](https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611 "2021-06-17T18:01:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matiasfduque](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@matiasfduque](https://discourse.psychopy.org/u/matiasfduque)\
**Post date:** [June 17, 2021, 6:01pm UTC](https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611/1 "2021-06-17T18:01:27Z")

</div>

URL of experiment: [https://run.pavlovia.org/matiasfduque/qrp\_english/html](https://run.pavlovia.org/matiasfduque/qrp_english/html)

Description of the problem: Hidden objects are clickable.

I have several routines in which a “Click here to advance” button (it’s an image object) appears after a certain amount of time. I have the mouse component to End Routine on valid click (i.e., the advance button), but if participants click on the _area_ where the button will appear eventually, it registers it like a valid click and ends the routine. This has cause a lot of problems in loops, where routines are back-to-back and objects are aligned in the same place. Participants will “double click” and skip routines because the second click is registered as valid. Any idea how to fix this?

I temporary solution I found is to enable the mouse component 0.5s after the beginning of the routine, preventing any type of double clicking. However, for data analysis, does the time of a clicked object start at the beginning of the routine, or at the beginning of the mouse component? I still don’t know how to fix the “invisible valid click box” problem.

Thank you!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 17, 2021, 10:21pm UTC](https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611/2 "2021-06-17T22:21:18Z")

</div>

Instead of making the items invisible, can you move their position to off screen?

---

<div class="post-metadata">

**Author:** ![matiasfduque](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@matiasfduque](https://discourse.psychopy.org/u/matiasfduque)\
**Post date:** [June 17, 2021, 10:35pm UTC](https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611/3 "2021-06-17T22:35:20Z")

</div>

It’s not that I’m making items invisible. I am just selecting their “start time” to be X seconds after the routine begins. After the 60 seconds, that image would appear, participants would click on it and end the routine. However, when participants click on that location before the image even appears, it ends the routine and records a “click” on the item (even though it was not displayed).

I’m doing all of this in builder. So to use concrete examples, when participants click on the _location_ of NextButton7 even before it appears, it ends the routine.

 ![Screen Shot 2021-06-17 at 5.33.09 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/0/8/08de8323cc92083a826e6a501de0c2bab4197ded.jpeg)  
 ![Screen Shot 2021-06-17 at 5.33.45 PM](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/0/1/0189bb6b89990d4c64ac17111097e96114f14411.jpeg)

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [June 18, 2021, 7:28am UTC](https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611/4 "2021-06-18T07:28:45Z")

</div>

I agree that’s annoying.

Presumably this is a “feature” @TParsons?

You could use a code component to move the position of NextButton7 at 182 seconds.

---

<div class="post-metadata">

**Author:** ![TParsons](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/tparsons/32/8301_2.png) [@TParsons](https://discourse.psychopy.org/u/TParsons)\
**Post date:** [June 18, 2021, 9:59am UTC](https://discourse.psychopy.org/t/hidden-objects-are-clickable/23611/5 "2021-06-18T09:59:36Z")

</div>

This is happening because the :mouse: Mouse components is what’s listening for clicks, not the :image: Image, so it starts listening for clicks when the Mouse component starts. The simplest solution is to just set the start time of the Mouse to be the same as the Image, if you don’t need the mouse for anything other than ending the routine.

If the image is just of some text, you could also replace it with a Button component, which has a mouse component built in without needing any code.
