From 2a14d594c99680838a99d40936e807f4cb3044de Mon Sep 17 00:00:00 2001 From: zerescas Date: Thu, 13 Feb 2025 15:10:20 +0900 Subject: [PATCH] fix[slider]: prevent triggering blur when focus shifts from slider handle to slider container --- components/vc-slider/src/common/createSlider.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/vc-slider/src/common/createSlider.tsx b/components/vc-slider/src/common/createSlider.tsx index cdb37dc990..a7c988ae67 100644 --- a/components/vc-slider/src/common/createSlider.tsx +++ b/components/vc-slider/src/common/createSlider.tsx @@ -166,6 +166,12 @@ export default function createSlider(Component) { } }, onBlur(e) { + // Prevent triggering blur when focus shifts from the slider handle to the slider container. + // This avoids ending the drag operation if the user clicks within the slider area. + if(this.sliderRef === e.relatedTarget) { + return; + } + if (!this.dragTrack) { this.onEnd(); }