Skip to content

Commit b3fb7e9

Browse files
authored
Added check to force release if button is -1 (#13578)
1 parent 6bbe83a commit b3fb7e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
279279
if (
280280
this.startAndReleaseDragOnPointerEvents &&
281281
this.currentDraggingPointerId == (<IPointerEvent>pointerInfo.event).pointerId &&
282-
this._activeDragButton === pointerInfo.event.button
282+
(this._activeDragButton === pointerInfo.event.button || this._activeDragButton === -1)
283283
) {
284284
this.releaseDrag();
285285
}

0 commit comments

Comments
 (0)