Skip to content

Commit

Permalink
fix: Flakey test
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Mar 17, 2024
1 parent d9904dc commit c0d04e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/engine/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,10 @@ O|===|* >________________>\n\
}
}

public isDisposed() {
return this._disposed;
}

/**
* Returns a BoundingBox of the top left corner of the screen
* and the bottom right corner of the screen.
Expand Down
3 changes: 3 additions & 0 deletions src/engine/Input/PointerEventReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ export class PointerEventReceiver {
* browser events.
*/
public init(options?: PointerInitOptions) {
if (this.engine.isDisposed()) {
return;
}
// Disabling the touch action avoids browser/platform gestures from firing on the canvas
// It is important on mobile to have touch action 'none'
// https://stackoverflow.com/questions/48124372/pointermove-event-not-working-with-touch-why-not
Expand Down

0 comments on commit c0d04e8

Please sign in to comment.