From d4e70ec736d20cc04c072c6b84e47d651eb70977 Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 13 Jul 2017 14:33:52 -0800 Subject: [PATCH] removed setTimeouts in closeButton listeners, https://github.com/phetsims/joist/issues/424 --- js/Dialog.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/js/Dialog.js b/js/Dialog.js index f30f5be7..1a889ce5 100644 --- a/js/Dialog.js +++ b/js/Dialog.js @@ -123,16 +123,10 @@ define( function( require ) { xMargin: 5, yMargin: 5, listener: function() { - - // This setTimeout call is a workaround until hide and dispose are separated. It should be removed once - // https://github.com/phetsims/joist/issues/424 is complete. - setTimeout( function() { self.hide(); }, 0 ); + self.hide(); }, accessibleFire: function() { - - // 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 ); + self.focusActiveElement(); }, tandem: options.tandem.createTandem( 'closeButton' ),