Event Click Javascript runs on its own

0

I'm trying to create a listener in Javascript, and in any browser on the computer it works perfectly, but when I run the web from a mobile, the click event runs only, when you want, without having clicked ...

This is my function:

animatedMarker.addEventListener('click', function(ev, target){
            //Código a ejecutar onClick.
        });

This is my html:

<a-scene stats embedded arjs='debugUIEnabled: false;'>
    <a-marker markerhandler emitevents="true" cursor="rayOrigin: mouse" type='pattern' preset='custom' url='/pattern.patt'
     id="animated-marker">
        <a-gltf-model src="/ModelosPruebas/Ani/PruebaAni.gltf" animation-mixer="clip: SubeBaja;" id="animated-model"></a-gltf-model>
        <a-gltf-model src="/ModelosPruebas/TextoPrueba.gltf" id="animated-model-2"></a-gltf-model>
    </a-marker>
    <a-entity camera></a-entity>
</a-scene>

I'm programming a web AR, with AR.js , in this case the idea is that by touching / clicking the 3D model, an animation starts.

Any idea what may be happening? (I do not control much Javascript) Thanks!

    
asked by mar lopez 20.12.2018 в 16:26
source

0 answers