BoundingBoxGizmo displays unexpected highlighting behavior on touch devices

In the above playground, when the blue BoundingBoxGizmo (out-of-the-box implementation) has its scale boxes dragged on touch devices (real or browser-emulated), the behavior of the the scale box highlighting deviates from the behavior that occurs when dragging the scale boxes with mouse.

  • Mouse: A scale box highlights when selected by mouse pointerDown and unhighlights when the mouse leaves the scale box’s area or by a subsequent pointerUp.
  • Touch: A scale box highlights when pressed by touch and appears to only unhighlight when the touching finger leaves the scale box’s area. Releasing the finger from the selected scale box without moving the finger out of the scale box’s area beforehand causes the scale box to remain highlighted.

The purple BoundingBoxGizmo extends the base implementation and adds an extra drag-end observer that resets the material of the scale box back to the unhighlighted material whenever a touch release is detected, allowing the touch highlighting behavior to be consistent with that of mouse highlighting for the gizmo. Perhaps this touch release detection could be implemented directly into the base BoundingBoxGizmo class?

Welcome aboard!

cc @Cedric who is our Gizmo wizard!

This looks like a cool addition! Can you please open a PR @Hsifnus ?

Sure thing! Opened a PR here.