aframe-orbit-controls-component icon indicating copy to clipboard operation
aframe-orbit-controls-component copied to clipboard

pointerevents for touch devices

Open morandd opened this issue 7 years ago • 4 comments

@tizzle - I've been using a touchscreen laptop recently and touch events on the screen need to be handled differently. I think the correct way is to set the CSS attribute touchAction=none on the Aframe canvas (so that the canvas el doesn't use the OS-defined touch gestures) then change the listeners from mousedown, mouseup to pointerdown, pointerup.

This can all be wrapped in if (window.PointerEvent) for backwards compatibility, though basically all current browsers support pointer events.

I have this as a lower-priority item to do. Just wanted to flag it here.

morandd avatar Jun 27 '17 13:06 morandd

@morandd,

can you give me some background what machine, what OS and browser you are using? On top: What where the problems you are experiencing with the current implementation? I'm on a MacBook Pro and i never ran into any issues...

Edit: Ignore that last bit, didn't see you wrote touchscreen :)

Cheers,

Till

tizzle avatar Jun 27 '17 13:06 tizzle

Yeah I think this only covers the use case of touch interaction on touch laptops. And maybe some tablets. I'm using a surface.

morandd avatar Jun 27 '17 13:06 morandd

Ok, i hope i can somehow get hands on one of those.

I tested on iPhone and iPad where the current touch implementation works well. But it might be different on touch "laptops" or other tablets.

Cheers

tizzle avatar Jun 27 '17 14:06 tizzle

for ref: https://www.davrous.com/2015/08/10/unifying-touch-and-mouse-how-pointer-events-will-make-cross-browsers-touch-support-easy/ https://patrickhlauke.github.io/touch/tests/event-listener.html

morandd avatar Jun 27 '17 14:06 morandd