Skip to content

Commit

Permalink
snap to zero in blur listener respects snapToZeroProperty, see #853
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jun 17, 2024
1 parent d4a7a3f commit 43a25d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/HeaterCoolerFront.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default class HeaterCoolerFront extends Node {

// Set the slider back to zero when it loses focus.
this.slider.addInputListener( {
blur: setSliderToZero
blur: () => { this.snapToZeroProperty.value && setSliderToZero(); }
} );

// A shortcut to easily return the value to zero when using the keyboard.
Expand Down

0 comments on commit 43a25d2

Please sign in to comment.