[firefox] Fix the pointer getting stuck down when you press the control key (#1390)
This PR fixes a bug in firefox where the pointer can get stuck down while pressing the control key. It achieves this by taking a previous fix (specifically for `useShapeEvents`), and it applies the fix at a deeper level (within `app.dispatch`). ## Before  ## After  ### Change Type - [x] `patch` — Bug Fix ### Test Plan 1. Use firefox. 2. On the canvas... pointer down (to start a selection box). 3. Control key down. 4. Pointer up. 5. Make sure that that the selection box is gone. ^ Repeat the above for: Pointer down on a shape. Pointer down on a handle. ### Release Notes - [Firefox] Fixed a bug where the pointer could get stuck down when the control key is held down.
This commit is contained in:
parent
f59bfe01b1
commit
9c28d8a6bd
4 changed files with 27 additions and 29 deletions
|
@ -43,7 +43,7 @@ export function useCanvasEvents() {
|
|||
|
||||
function onPointerUp(e: React.PointerEvent) {
|
||||
if ((e as any).isKilled) return
|
||||
if (e.button !== 0 && e.button !== 1 && e.button !== 5) return
|
||||
if (e.button !== 0 && e.button !== 1 && e.button !== 2 && e.button !== 5) return
|
||||
lastX = e.clientX
|
||||
lastY = e.clientY
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue