Skip to content

Commit

Permalink
Only trigger releasedDisabled if the value would change, see phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Dec 27, 2017
1 parent d6011b3 commit 857c8b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/buttons/MomentaryButtonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ define( function( require ) {

// turn off when disabled
var enabledListener = function( enabled ) {
if ( !enabled ) {
if ( !enabled && !valueProperty.equalsValue( valueOff ) ) {
options.phetioEventSource.startEvent( 'user', 'releasedDisabled' );
valueProperty.set( valueOff );
options.phetioEventSource.endEvent();
Expand Down

0 comments on commit 857c8b2

Please sign in to comment.