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

Commit 45f474b

Browse files
committed
fix(input[range]): set correct value when max < min
1 parent d7d172c commit 45f474b

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
@@ -1640,7 +1640,8 @@ function rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) {
16401640
// IE11 doesn't set the el val correctly if the maxVal is less than the element value
16411641
if (maxVal < elVal) {
16421642
element.val(maxVal);
1643-
elVal = minVal;
1643+
// IE11 and Chrome don't set the value to the minVal when max < min
1644+
elVal = maxVal < minVal ? minVal : maxVal;
16441645
}
16451646
ctrl.$setViewValue(elVal);
16461647
} else {

0 commit comments

Comments
 (0)