Safari pointerEvents bug

I’m making a system that lets you click to drag the camera around (only in the 2D plane it currently resides–no rotation)–Not sure this is the best way to be doing what I want, but I believe what I have encountered is a bug all the same.

It appears that on the Safari browser (v12.1), pointerInfo.event.movementX and pointerInfo.event.movementY are both undefined whereas on Chrome, Edge, and Firefox it is when the case is “BABYLON.PointerEventTypes.POINTERMOVE” .

On IE 11 the playground doesn’t want to load because of various errors-- is there a prebuilt fix/solution floating around for this that I missed? I don’t want to go editing the core files without being sure there without pursuing alternatives, especially since I’m new to babylon and have an incomplete conception of what I am doing). Once I have IE working at all, I’ll report if it shares the issue Safari has.

https://playground.babylonjs.com/#PXE2FS

Hey and welcome!
We do not support IE anymore for the playground (even though we keep supporting it for the rendering engine of course).

On Safari, did you make sure to include pep.js to get pointer event polyfill?

1 Like

Thanks! Ah all right–I’ll just test it on the local IE machine when necessary then.

As for pep, at the time of writing I had:
<script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>

and have since updated to the non-min version of a newer one:
<script src="https://code.jquery.com/pep/0.4.3/pep.js"></script>

though the problem still persists.

I got the link for the new pep version from:
https://doc.babylonjs.com/how_to/interactions

I didn’t have touch-action=“none” attr set either, but putting that in doesn’t seem to have fixed it either

Have you tested forcing the settings in the canvas html ?

<canvas
    id="renderCanvas"
    style="width:100vw;height:100vh;position:absolute;top:0;left:0;"
    touch-action="none"
  >
</canvas>

I did struggle a lot with those also.
You also need to put pep in the head if possible.
Setting it in before the end html tag won’t be enough.

I’ve moved pep into the head as suggested. Test results of the inline styles are they don’t seem to fix the issue