From 93b7d161a4f411cb00a4d9eb6b67d731376a04a7 Mon Sep 17 00:00:00 2001 From: Jesse Greenberg Date: Tue, 20 Jun 2017 13:18:37 -0600 Subject: [PATCH] Apply same workaround for https://github.com/phetsims/phet-io/issues/1143 until #424 is complete --- js/Dialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/Dialog.js b/js/Dialog.js index ca582266..03c7fc8b 100644 --- a/js/Dialog.js +++ b/js/Dialog.js @@ -129,7 +129,10 @@ define( function( require ) { setTimeout( function() { self.hide(); }, 0 ); }, accessibleFire: function() { - self.focusActiveElement(); + + // the active element must be focused after the Dialog is hidden, so this must also be wrapped in a + // timeout. This should also be removed once https://github.com/phetsims/joist/issues/424 is complete. + setTimeout( function() { self.focusActiveElement(); }, 0 ); }, tandem: options.tandem.createTandem( 'closeButton' ),