Allow tab to go past a slider

This commit is contained in:
Vincent Fiduccia 2015-04-15 16:39:31 -07:00
parent 95fe050d35
commit c573f15117
1 changed files with 9 additions and 1 deletions

View File

@ -179,23 +179,31 @@ export default Ember.Component.extend({
},
keyDown: function(event) {
var handled = false;
switch ( event.which )
{
case C.KEY_LEFT:
this.decrementProperty('value', this.get('step'));
handled = true;
break;
case C.KEY_RIGHT:
this.incrementProperty('value', this.get('step'));
handled = true;
break;
case C.KEY_UP:
this.set('value', this.get('valueMax'));
handled = true;
break;
case C.KEY_DOWN:
this.set('value', this.get('valueMin'));
handled = true;
break;
}
event.preventDefault();
if ( handled )
{
event.preventDefault();
}
},
valueChanged: function() {