Skip to content

Commit d538245

Browse files
committed
fix(range): knob B can only be actived if range is dual
1 parent b541832 commit d538245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/range/range.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export class Range extends Ion implements AfterViewInit, ControlValueAccessor, O
368368

369369
// figure out which knob they started closer to
370370
const ratio = clamp(0, (current.x - rect.left) / (rect.width), 1);
371-
this._activeB = (Math.abs(ratio - this._ratioA) > Math.abs(ratio - this._ratioB));
371+
this._activeB = this._dual && (Math.abs(ratio - this._ratioA) > Math.abs(ratio - this._ratioB));
372372

373373
// update the active knob's position
374374
this._update(current, rect, true);

0 commit comments

Comments
 (0)