mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(range): knob B can only be actived if range is dual
This commit is contained in:
@@ -368,7 +368,7 @@ export class Range extends Ion implements AfterViewInit, ControlValueAccessor, O
|
||||
|
||||
// figure out which knob they started closer to
|
||||
const ratio = clamp(0, (current.x - rect.left) / (rect.width), 1);
|
||||
this._activeB = (Math.abs(ratio - this._ratioA) > Math.abs(ratio - this._ratioB));
|
||||
this._activeB = this._dual && (Math.abs(ratio - this._ratioA) > Math.abs(ratio - this._ratioB));
|
||||
|
||||
// update the active knob's position
|
||||
this._update(current, rect, true);
|
||||
|
||||
Reference in New Issue
Block a user