Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion angular.rangeSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,18 @@
if (scope.pinHandle !== 'max') {
throwWarning('modelMax must be a number');
}
scope.modelMax = scope.max;
// scope.modelMax = scope.max;

// if deleted with backspace in a type="number" input, the value is set to null
if (scope.modelMax === null) {
if (scope.modelMin) {
scope.modelMax = scope.modelMin
} else if (scope.min) {
scope.modelMax = scope.min;
} else {
scope.modelMax = 0;
}
}
}

var handle1pos = restrict(((scope.modelMin - scope.min) / range) * 100),
Expand Down