Skip to content

Commit

Permalink
use trail.containsNode in ComboBox, phetsims/scenery#927
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 22, 2019
1 parent 8b95298 commit aed1895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ define( require => {
// @private listener for 'click outside to dismiss'
this.clickToDismissListener = {
down: event => {
//TODO scenery#927 is trail.nodes public? should we add Trail.containsNode?

// Ignore if we click over the button, since the button will handle hiding the list.
if ( event.trail.nodes.indexOf( this.button ) === -1 ) {
if ( !event.trail.containsNode( this.button ) ) {
this.hideListBox();
}
}
Expand Down

0 comments on commit aed1895

Please sign in to comment.