Skip to content

Commit

Permalink
Only run fuzzBoardEvents if the document has focus, see phetsims/aq…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Mar 16, 2022
1 parent 6f61711 commit 03d45a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/SimDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class SimDisplay extends Display {
}

// fire or synthesize keyboard input events
if ( phet.chipper.queryParameters.fuzzBoard ) {
if ( phet.chipper.queryParameters.fuzzBoard && document.hasFocus() ) {
assert && assert( phet.chipper.queryParameters.supportsInteractiveDescription, 'fuzzBoard can only run with interactive description enabled.' );
this.keyboardFuzzer.fuzzBoardEvents( phet.chipper.queryParameters.fuzzRate );
}
Expand Down

0 comments on commit 03d45a1

Please sign in to comment.