From 03d45a130d10a0d52bec1135a6e3943f78cbd118 Mon Sep 17 00:00:00 2001 From: Jesse Date: Wed, 16 Mar 2022 12:32:28 -0400 Subject: [PATCH] Only run `fuzzBoardEvents` if the document has focus, see https://github.com/phetsims/aqua/issues/134 --- js/SimDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimDisplay.js b/js/SimDisplay.js index 7d8e4af5..bd06e7a8 100644 --- a/js/SimDisplay.js +++ b/js/SimDisplay.js @@ -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 ); }