Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit ba98e9e

Browse files
committed
fix(input[range]): correctly set value when min > max
1 parent 1ee06a9 commit ba98e9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ng/directive/input.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,8 @@ function rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) {
16471647
// IE11 doesn't set the el val correctly if the maxVal is greater than the element value
16481648
if (maxVal < elVal) {
16491649
element.val(maxVal);
1650-
elVal = minVal;
1650+
// IE11 and Chrome don't set the value to the minVal when max < min
1651+
elVal = maxVal < minVal ? minVal : maxVal;
16511652
}
16521653
ctrl.$setViewValue(elVal);
16531654
} else {

0 commit comments

Comments
 (0)