Merge pull request #2307 from tugcekucukoglu/range

Fixed #2074 - Range slider get stuck when both handle on max value
pull/2308/head
Tuğçe Küçükoğlu 2022-03-11 15:41:16 +03:00 committed by GitHub
commit e2493145e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -133,10 +133,18 @@ export default {
if (this.disabled) {
return;
}
DomHandler.addClass(this.$el, 'p-slider-sliding');
this.dragging = true;
this.updateDomData();
if (this.range && this.modelValue[0] === this.max) {
this.handleIndex = 0;
}
else {
this.handleIndex = index;
}
event.preventDefault();
},
onDrag(event) {