Skip to content

Commit

Permalink
handle focus for RewardDialog, OopsDialog, AmplitudeKeypadDialog, #194
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Sep 28, 2021
1 parent 6fe97a0 commit b9a25a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/common/view/AmplitudeNumberDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class AmplitudeNumberDisplay extends VBox {
}
}
);
amplitudeKeypadDialog.focusCloseButton();
},
tandem: options.tandem.createTandem( 'pressListener' ),
phetioEnabledPropertyInstrumented: true
Expand Down
5 changes: 4 additions & 1 deletion js/discrete/view/DiscreteScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ class DiscreteScreenView extends ScreenView {
visiblePropertyOptions: { phetioReadOnly: true },
tandem: options.tandem.createTandem( 'oopsSawtoothWithCosinesDialog' )
} );
model.oopsSawtoothWithCosinesEmitter.addListener( () => oopsSawtoothWithCosinesDialog.show() );
model.oopsSawtoothWithCosinesEmitter.addListener( () => {
oopsSawtoothWithCosinesDialog.show();
oopsSawtoothWithCosinesDialog.focusCloseButton();
} );

//------------------------------------------------------------------------------------------------------------------
// Layout
Expand Down
1 change: 1 addition & 0 deletions js/waveGame/view/WaveGameLevelNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ class WaveGameLevelNode extends Node {
// The score has reached the magic number where a reward is display.
gameAudioPlayer.gameOverPerfectScore();
rewardDialog.show();
rewardDialog.focusCloseButton();
}
else {

Expand Down

0 comments on commit b9a25a2

Please sign in to comment.