Mouse temporary appears on screen after set to invisible

I’m running a couple of online experiments. All of them are run in fullscreen and the mouse is set to be invisible by using this code at the beginning of the experiment.

// Hide cursor'none';

I’ve run around 30 participants and around 5 people reported that the mouse went visible during part of the experiment and then disappeared again after some trials. Also, most of them were using a Mac and Google Chrome and one of them was using Windows 10. I really don’t know how to look more deeply into this as I don’t see any patter in the people that reported seeing the mouse pointer. Any thoughts?

Hey @niclai, could you try adding <style>* { cursor: none; }</style> inside of <head> in your index.html? Could you send me a link to your study if that doesn’t work? Thanks, s.

1 Like

Hi @sotiri, would this work even though I keep also this custom code?

// Hide cursor'none';

Right now is hard to tell whether it works because only some people (mostly using Mac machines) are reporting the mouse being visible during some trials. Do you think I can keep both codes?

Does it matter where in the header? I added after the end.

    <title>br-len-del [PsychoPy]</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="user-scalable=no">

    <!-- styles -->
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="">
    <script>* { cursor: none; }</script>


And the last thing, do you know whether I can log the mouse visibility? I added a question to be answered by the participant, but it would be nice if there is a way to automatically log the mouse pointer visibility. Thanks a lot for the help.

Sorry that was a typo, the wrapping tag should be <style> instead of <script> (corrected in my original reply). Placing that at the very end of <head> like you have should be fine, thanks, s.

Sorry when you say log mouse visibility, do you mean as part of the data that gets saved on exit? Do you mean CSS visibility?

Sorry, I missed another part of your question, yes that would override your custom code and your custom code would not be required then, provided that it all works as expected of course!

Ok, so this indeed hides the mouse. I removed the old code.

My other question has to do with the fact that some participants, under no very clear patter (maybe Macs along with Chrome), reported seeing the mouse pointer at some point during the experiment although it was invisible at the beginning. Is there a way to log the visibility status of the mouse? Or something similar, so I can filter people afterwards.

Apologies for the naive question, but how can I make permanent changes to the index.html file without having them reverted every time I sync with Pavlovia? I’m having the same problem with the cursor (which doesn’t disappear on all browsers) and I was trying to add the line of code you suggested, but it disappears as soon as I sync. Thanks.

Hi @aurelio.bruno, no problem, you can add index.html to your list of .gitignore rules. PsychoPy should have created a .gitignore for your project already, s.

Hi @sotiri, thanks a lot for your reply. I tried to add index.html to my project’s .gitignore file ( I tried adding “index.html” at the end, or the entire pathname, or “*.html”), but it keeps being updated erasing my changes.

Hi @aurelio.bruno, you also need to remove the file from git list-files, you can easily google how? Thanks, x

Ok, thank you.

hi, @sotiri, is there a way to hide the mouse only during the experiment, so that subjects can easily click on ok at the beginning and the end

Alternatively, is there a way to let subjects hit enter key instead of clicking on ok?

Hi Niclai,

I have the same issue. I am a beginner with the Psychopy. Could you please tell me where I put the code so that the cursor is invisible?


Hi Nam, there is a file named index.html, you should add the line you quoted there. In my quote, there is an example of it looked for me. Not sure if the index.html file looks somewhat different now.