Slider: fix broken keyboard a11y bug (#14792)

pull/15238/head
Erez Sobel 2019-04-23 14:09:57 +02:00 committed by iamkun
parent 8cd5d9a438
commit 73ca7be647
1 changed files with 2 additions and 0 deletions

View File

@ -145,11 +145,13 @@
if (this.disabled) return;
this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100;
this.setPosition(this.newPosition);
this.$parent.emitChange();
},
onRightKeyDown() {
if (this.disabled) return;
this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100;
this.setPosition(this.newPosition);
this.$parent.emitChange();
},
onDragStart(event) {
this.dragging = true;