Skip to content

Commit

Permalink
select large button on focus, #355
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Oct 24, 2017
1 parent 373c54b commit b7216f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/HomeScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ define( function( require ) {
smallScreenButton.visible && smallScreenButton.focus();
largeScreenButton.visible && largeScreenButton.focus();
};
smallScreenButton.addAccessibleInputListener( { click: toggleListener } );
smallScreenButton.addAccessibleInputListener( { focus: toggleListener } );
largeScreenButton.addAccessibleInputListener( { click: toggleListener } );
// largeScreenButton.mouseArea = largeScreenButton.touchArea = Shape.bounds( largeScreenButton.bounds ); // cover the gap in the vbox

Expand Down
3 changes: 2 additions & 1 deletion js/ScreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ define( function( require ) {
phetioEvents.end( id );
};
this.addInputListener( { down: downListener } );
this.addAccessibleInputListener( { click: downListener } );
this.addAccessibleInputListener( { click: function() { large && downListener(); } } );
this.addAccessibleInputListener( { focus: function() { !large && downListener(); } } );

// Set highlight listeners to the small screen button
if ( !large ) {
Expand Down

0 comments on commit b7216f8

Please sign in to comment.