Skip to content

Commit

Permalink
emit attempted update proir to determining new value, see #411
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg authored and mbarlow12 committed Oct 18, 2018
1 parent 46ee149 commit 0677cbd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions js/accessibility/AccessibleSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ define( function( require ) {
// on 'end' and 'home' snap to max and min of enabled range respectively (this is typical browser
// behavior for sliders)
if ( code === KeyboardUtil.KEY_END ) {
newValue = this._enabledRangeProperty.get().max;
this.increasedEmitter.emit();
newValue = this._enabledRangeProperty.get().max;
}
else if ( code === KeyboardUtil.KEY_HOME ) {
newValue = this._enabledRangeProperty.get().min;
this.decreasedEmitter.emit();
newValue = this._enabledRangeProperty.get().min;
}
}
else {
Expand All @@ -381,12 +381,12 @@ define( function( require ) {
stepSize = this.pageKeyboardStep;

if ( code === KeyboardUtil.KEY_PAGE_UP ) {
newValue = this._valueProperty.get() + stepSize;
this.increasedEmitter.emit();
newValue = this._valueProperty.get() + stepSize;
}
else if ( code === KeyboardUtil.KEY_PAGE_DOWN ) {
newValue = this._valueProperty.get() - stepSize;
this.decreasedEmitter.emit();
newValue = this._valueProperty.get() - stepSize;
}
}
else if ( KeyboardUtil.isArrowKey( code ) ) {
Expand All @@ -395,12 +395,12 @@ define( function( require ) {
stepSize = event.shiftKey ? this.shiftKeyboardStep : this.keyboardStep;

if ( code === KeyboardUtil.KEY_RIGHT_ARROW || code === KeyboardUtil.KEY_UP_ARROW ) {
newValue = this._valueProperty.get() + stepSize;
this.increasedEmitter.emit();
newValue = this._valueProperty.get() + stepSize;
}
else if ( code === KeyboardUtil.KEY_LEFT_ARROW || code === KeyboardUtil.KEY_DOWN_ARROW ) {
newValue = this._valueProperty.get() - stepSize;
this.decreasedEmitter.emit();
newValue = this._valueProperty.get() - stepSize;
}

if ( this.roundToStepSize ) {
Expand Down Expand Up @@ -474,12 +474,12 @@ define( function( require ) {
this._startDrag();

if ( inputValue > this._valueProperty.get() ) {
newValue = this._valueProperty.get() + stepSize;
this.increasedEmitter.emit();
newValue = this._valueProperty.get() + stepSize;
}
else if ( inputValue < this._valueProperty.get() ) {
newValue = this._valueProperty.get() - stepSize;
this.decreasedEmitter.emit();
newValue = this._valueProperty.get() - stepSize;
}

if ( this.roundToStepSize ) {
Expand Down

0 comments on commit 0677cbd

Please sign in to comment.