fix[slider]: prevent triggering blur when focus shifts from slider handle to slider container

pull/8037/head
zerescas 2025-02-13 15:10:20 +09:00
parent 3db5e191b8
commit 2a14d594c9
1 changed files with 6 additions and 0 deletions

View File

@ -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();
}