diff --git a/angular.rangeSlider.js b/angular.rangeSlider.js index 3f71549..f3d348e 100644 --- a/angular.rangeSlider.js +++ b/angular.rangeSlider.js @@ -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),